Audacity  3.0.3
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ShuttleGuiBase Class Reference

Base class for shuttling data to and from a GUI. More...

#include <ShuttleGui.h>

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

Classes

struct  ListControlColumn
 

Public Member Functions

 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 ApplyItem (int step, const DialogDefinition::Item &item, wxWindow *pWind, wxWindow *pDlg)
 

Protected Member Functions

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

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
 

Private Member Functions

void DoInsertListColumns (wxListCtrl *pListCtrl, long listControlStyles, std::initializer_list< const ListControlColumn > columns)
 
void DoDataShuttle (const wxString &Name, WrappedType &WrappedRef)
 
wxCheckBox * DoTieCheckBoxOnRight (const TranslatableString &Prompt, WrappedType &WrappedRef)
 
wxTextCtrl * DoTieTextBox (const TranslatableString &Prompt, WrappedType &WrappedRef, const int nChars)
 
wxTextCtrl * DoTieNumericTextBox (const TranslatableString &Prompt, WrappedType &WrappedRef, const int nChars)
 
wxCheckBox * DoTieCheckBox (const TranslatableString &Prompt, WrappedType &WrappedRef)
 
wxSlider * DoTieSlider (const TranslatableString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
 
wxSpinCtrl * DoTieSpinCtrl (const TranslatableString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
 
wxRadioButton * DoAddRadioButton (const TranslatableString &Prompt, int style, int selector, int initValue)
 Unwrapped string value. More...
 

Private Attributes

std::vector< EnumValueSymbolmRadioSymbols
 
wxString mRadioSettingName
 
Optional< WrappedTypemRadioValue
 The setting controlled by a group. More...
 
int mRadioCount
 The wrapped value associated with the active radio button. More...
 
wxString mRadioValueString
 The index of this radio item. -1 for none. More...
 

Detailed Description

Base class for shuttling data to and from a GUI.

see also ShuttleGui

Use the:

The code in this file is fairly repetitive. We are dealing with

A technique used to reduce the size of the Tie functions is to have one generic Tie function that uses WrappedType for its data type. Type specific Tie functions themselves call the generic variant.

A second technique used to reduce the size of Tie functions only comes into play for two-step Tie functions. (A two step Tie function is one that transfers data between the registry and the GUI via an intermediate temporary variable). In the two step style, a function ShuttleGuiBase::DoStep() determines which transfers in the function are to be done, reducing repetitive if-then-else's.

Although unusual, these two techniques make the code easier to add to and much easier to check for correctness. The alternative 'more obvious' code that just repeats code as needed is considerably longer.

You would rarely use ShuttleGuiBase directly, instead you'd use ShuttleGui.

There is DOxygen documentation on how to use the ShuttleGui class in The Shuttle System .

Definition at line 253 of file ShuttleGui.h.

Constructor & Destructor Documentation

◆ ShuttleGuiBase()

ShuttleGuiBase::ShuttleGuiBase ( wxWindow *  pParent,
teShuttleMode  ShuttleMode,
bool  vertical,
wxSize  minSize 
)

Definition at line 126 of file ShuttleGui.cpp.

128  : mpDlg{ pParent }
129 {
130  wxASSERT( (pParent != NULL ) || ( ShuttleMode != eIsCreating));
131  mpbOptionalFlag = nullptr;
132  mpParent = pParent;
133  mShuttleMode = ShuttleMode;
134  Init( vertical, minSize );
135 }

◆ ~ShuttleGuiBase()

ShuttleGuiBase::~ShuttleGuiBase ( )
virtual

Definition at line 137 of file ShuttleGui.cpp.

138 {
139 }

Member Function Documentation

◆ AddBitmapButton()

wxBitmapButton * ShuttleGuiBase::AddBitmapButton ( const wxBitmap &  Bitmap,
int  PositionFlags = wxALIGN_CENTRE,
bool  setDefault = false 
)

Definition at line 372 of file ShuttleGui.cpp.

374 {
375  UseUpId();
376  if( mShuttleMode != eIsCreating )
377  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxBitmapButton);
378  wxBitmapButton * pBtn;
379  mpWind = pBtn = safenew wxBitmapButton(GetParent(), miId, Bitmap,
380  wxDefaultPosition, wxDefaultSize, GetStyle( wxBU_AUTODRAW ) );
381  pBtn->SetBackgroundColour(
382  wxColour( 246,246,243));
383 // wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
384  miProp=0;
385  UpdateSizersCore(false, PositionFlags | wxALL);
386  if (setDefault)
387  pBtn->SetDefault();
388  return pBtn;
389 }

References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, UpdateSizersCore(), and UseUpId().

Referenced by AudacityFileConfig::Warn().

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

◆ AddButton()

wxButton * ShuttleGuiBase::AddButton ( const TranslatableString Text,
int  PositionFlags = wxALIGN_CENTRE,
bool  setDefault = false 
)

Definition at line 353 of file ShuttleGui.cpp.

355 {
356  UseUpId();
357  if( mShuttleMode != eIsCreating )
358  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxButton);
359  wxButton * pBtn;
360  const auto translated = Text.Translation();
361  mpWind = pBtn = safenew wxButton(GetParent(), miId,
362  translated, wxDefaultPosition, wxDefaultSize,
363  GetStyle( 0 ) );
364  mpWind->SetName(wxStripMenuCodes(translated));
365  miProp=0;
366  UpdateSizersCore(false, PositionFlags | wxALL);
367  if (setDefault)
368  pBtn->SetDefault();
369  return pBtn;
370 }

References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizersCore(), and UseUpId().

Referenced by anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), ExportCL::Export(), 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(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), AudacityLogger::Show(), HelpSystem::ShowHtmlText(), and AudacityFileConfig::Warn().

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

◆ AddCheckBox() [1/3]

wxCheckBox * ShuttleGuiBase::AddCheckBox ( const TranslatableString Prompt,
bool  Selected 
)

Definition at line 302 of file ShuttleGui.cpp.

303 {
304  HandleOptionality( Prompt );
305  auto realPrompt = Prompt.Translation();
306  if( mpbOptionalFlag )
307  {
308  AddPrompt( {} );
309  //realPrompt = wxT("");
310  }
311 
312  UseUpId();
313  if( mShuttleMode != eIsCreating )
314  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxCheckBox);
315  wxCheckBox * pCheckBox;
316  miProp=0;
317  mpWind = pCheckBox = safenew wxCheckBox(GetParent(), miId, realPrompt, wxDefaultPosition, wxDefaultSize,
318  GetStyle( 0 ));
319  pCheckBox->SetValue(Selected);
320  if (realPrompt.empty()) {
321  // NVDA 2018.3 does not read controls which are buttons, check boxes or radio buttons which have
322  // an accessibility name which is empty. Bug 1980.
323 #if wxUSE_ACCESSIBILITY
324  // so that name can be set on a standard control
325  pCheckBox->SetAccessible(safenew WindowAccessible(pCheckBox));
326 #endif
327  pCheckBox->SetName(wxT("\a")); // non-empty string which screen readers do not read
328  }
329  UpdateSizers();
330  return pCheckBox;
331 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpbOptionalFlag, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by DoTieCheckBox(), FrequencyPlotDialog::Populate(), SplashDialog::Populate(), ExportMP3Options::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), FFmpegNotFoundDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), and WarningDialog::WarningDialog().

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

◆ AddCheckBox() [2/3]

wxCheckBox* ShuttleGuiBase::AddCheckBox ( const TranslatableString Prompt,
const char *   
)
delete

◆ AddCheckBox() [3/3]

wxCheckBox* ShuttleGuiBase::AddCheckBox ( const TranslatableString Prompt,
const wxChar *   
)
delete

◆ AddCheckBoxOnRight() [1/3]

wxCheckBox * ShuttleGuiBase::AddCheckBoxOnRight ( const TranslatableString Prompt,
bool  Selected 
)

For a consistent two-column layout we want labels on the left and controls on the right. CheckBoxes break that rule, so we fake it by placing a static text label and then a tick box with an empty label.

Definition at line 336 of file ShuttleGui.cpp.

337 {
338  HandleOptionality( Prompt );
339  AddPrompt( Prompt );
340  UseUpId();
341  if( mShuttleMode != eIsCreating )
342  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxCheckBox);
343  wxCheckBox * pCheckBox;
344  miProp=0;
345  mpWind = pCheckBox = safenew wxCheckBox(GetParent(), miId, wxT(""), wxDefaultPosition, wxDefaultSize,
346  GetStyle( 0 ));
347  pCheckBox->SetValue(Selected);
348  pCheckBox->SetName(Prompt.Stripped().Translation());
349  UpdateSizers();
350  return pCheckBox;
351 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Stripped(), TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by DoTieCheckBoxOnRight(), and TieCheckBoxOnRight().

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

◆ AddCheckBoxOnRight() [2/3]

wxCheckBox* ShuttleGuiBase::AddCheckBoxOnRight ( const TranslatableString Prompt,
const char *   
)
delete

◆ AddCheckBoxOnRight() [3/3]

wxCheckBox* ShuttleGuiBase::AddCheckBoxOnRight ( const TranslatableString Prompt,
const wxChar *   
)
delete

◆ AddChoice() [1/2]

wxChoice * ShuttleGuiBase::AddChoice ( const TranslatableString Prompt,
const TranslatableStrings choices,
const TranslatableString selected 
)

Definition at line 426 of file ShuttleGui.cpp.

428 {
429  return AddChoice(
430  Prompt, choices, make_iterator_range( choices ).index( Selected ) );
431 }

References AddChoice(), and make_iterator_range().

Here is the call graph for this function:

◆ AddChoice() [2/2]

wxChoice * ShuttleGuiBase::AddChoice ( const TranslatableString Prompt,
const TranslatableStrings choices,
int  Selected = -1 
)

Definition at line 391 of file ShuttleGui.cpp.

393 {
394  HandleOptionality( Prompt );
395  AddPrompt( Prompt );
396  UseUpId();
397  if( mShuttleMode != eIsCreating )
398  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxChoice);
399  wxChoice * pChoice;
400  miProp=0;
401 
402  mpWind = pChoice = safenew wxChoice(
403  GetParent(),
404  miId,
405  wxDefaultPosition,
406  wxDefaultSize,
407  transform_container<wxArrayString>(
408  choices, std::mem_fn( &TranslatableString::StrippedTranslation ) ),
409  GetStyle( 0 ) );
410 
411  pChoice->SetMinSize( { 180, -1 } );// Use -1 for 'default size' - Platform specific.
412 #ifdef __WXMAC__
413 #if wxUSE_ACCESSIBILITY
414  // so that name can be set on a standard control
415  mpWind->SetAccessible(safenew WindowAccessible(mpWind));
416 #endif
417 #endif
418  pChoice->SetName(Prompt.Stripped().Translation());
419  if ( Selected >= 0 && Selected < (int)choices.size() )
420  pChoice->SetSelection( Selected );
421 
422  UpdateSizers();
423  return pChoice;
424 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Stripped(), TranslatableString::StrippedTranslation(), TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by AddChoice(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), NyquistEffect::BuildEffectWindow(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ImportRawDialog::ImportRawDialog(), LangChoiceDialog::LangChoiceDialog(), DependencyDialog::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), VampEffect::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DeviceToolBar::ShowComboDialog(), and TieChoice().

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

◆ AddCombo()

wxComboBox * ShuttleGuiBase::AddCombo ( const TranslatableString Prompt,
const wxString &  Selected,
const wxArrayStringEx choices 
)

Definition at line 510 of file ShuttleGui.cpp.

513 {
514  const auto translated = Prompt.Translation();
515  HandleOptionality( Prompt );
516  AddPrompt( Prompt );
517  UseUpId();
518  if( mShuttleMode != eIsCreating )
519  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxComboBox);
520  wxComboBox * pCombo;
521  miProp=0;
522 
523  int n = choices.size();
524  if( n>50 ) n=50;
525  int i;
526  wxString Choices[50];
527  for(i=0;i<n;i++)
528  {
529  Choices[i] = choices[i];
530  }
531 
532  mpWind = pCombo = safenew wxComboBox(GetParent(), miId, Selected, wxDefaultPosition, wxDefaultSize,
533  n, Choices, GetStyle( 0 ));
534  mpWind->SetName(wxStripMenuCodes(translated));
535 
536  UpdateSizers();
537  return pCombo;
538 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by ImportRawDialog::ImportRawDialog(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), ExportCLOptions::PopulateOrExchange(), and ExportFFmpegOptions::PopulateOrExchange().

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

◆ AddConstTextBox()

void ShuttleGuiBase::AddConstTextBox ( const TranslatableString Caption,
const TranslatableString Value 
)

Single line text box of fixed size.

Definition at line 726 of file ShuttleGui.cpp.

728 {
729  HandleOptionality( Prompt );
730  AddPrompt( Prompt );
731  UseUpId();
732  if( mShuttleMode != eIsCreating )
733  return;
734 // return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
735  miProp=0;
736  UpdateSizers();
737  miProp=0;
738  const auto translatedValue = Value.Translation();
739  mpWind = safenew wxStaticText(GetParent(), miId,
740  translatedValue, wxDefaultPosition, wxDefaultSize,
741  GetStyle( 0 ));
742  mpWind->SetName(translatedValue); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
743  UpdateSizers();
744 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by EditCurvesDialog::PopulateOrExchange().

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

◆ AddFixedText()

void ShuttleGuiBase::AddFixedText ( const TranslatableString Str,
bool  bCenter = false,
int  wrapWidth = 0 
)

Definition at line 433 of file ShuttleGui.cpp.

435 {
436  const auto translated = Str.Translation();
437  UseUpId();
438  if( mShuttleMode != eIsCreating )
439  return;
440  auto text = safenew wxStaticText(GetParent(),
441  miId, translated, wxDefaultPosition, wxDefaultSize,
442  GetStyle( wxALIGN_LEFT ));
443  mpWind = text;
444  if ( wrapWidth > 0 )
445  text->Wrap( wrapWidth );
446  mpWind->SetName(wxStripMenuCodes(translated)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
447  if( bCenter )
448  {
449  miProp=1;
450  UpdateSizersC();
451  }
452  else
453  UpdateSizers();
454 }

References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UpdateSizersC(), and UseUpId().

Referenced by anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), ApplyMacroDialog::ApplyMacroToProject(), NyquistEffect::BuildEffectWindow(), anonymous_namespace{ProjectFileManager.cpp}::CompactDialog::CompactDialog(), ContrastDialog::ContrastDialog(), ErrorDialog::ErrorDialog(), MeterPanel::OnPreferences(), AutoRecoveryDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), FFmpegNotFoundDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), AudacityFileConfig::Warn(), and WarningDialog::WarningDialog().

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

◆ AddGrid()

wxGrid * ShuttleGuiBase::AddGrid ( )

Definition at line 761 of file ShuttleGui.cpp.

762 {
763  UseUpId();
764  if( mShuttleMode != eIsCreating )
765  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxGrid);
766  wxGrid * pGrid;
767  SetProportions( 1 );
768  mpWind = pGrid = safenew wxGrid(GetParent(), miId, wxDefaultPosition,
769  wxDefaultSize, GetStyle( wxWANTS_CHARS ));
770  pGrid->SetMinSize( wxSize( 120, 150 ));
771  UpdateSizers();
772  return pGrid;
773 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Here is the call graph for this function:

◆ AddIcon()

void ShuttleGuiBase::AddIcon ( wxBitmap *  pBmp)

Definition at line 861 of file ShuttleGui.cpp.

862 {
863  UseUpId();
864  if( mShuttleMode != eIsCreating )
865 // return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
866  return;
867  wxBitmapButton * pBtn;
868  mpWind = pBtn = safenew wxBitmapButton(GetParent(), miId, *pBmp,
869  wxDefaultPosition, wxDefaultSize, GetStyle( wxBU_AUTODRAW ) );
870  pBtn->SetWindowStyle( wxBORDER_NONE );
871  pBtn->SetCanFocus(false);
872  UpdateSizersC();
873 }

References eIsCreating, GetParent(), GetStyle(), miId, mpWind, mShuttleMode, safenew, UpdateSizersC(), and UseUpId().

Here is the call graph for this function:

◆ AddListBox()

wxListBox * ShuttleGuiBase::AddListBox ( const wxArrayStringEx choices)

Definition at line 746 of file ShuttleGui.cpp.

747 {
748  UseUpId();
749  if( mShuttleMode != eIsCreating )
750  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxListBox);
751  wxListBox * pListBox;
752  SetProportions( 1 );
753  mpWind = pListBox = safenew wxListBox(GetParent(), miId,
754  wxDefaultPosition, wxDefaultSize, choices, GetStyle(0));
755  pListBox->SetMinSize( wxSize( 120,150 ));
756  UpdateSizers();
757  return pListBox;
758 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Referenced by anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), and ExportFFmpegOptions::PopulateOrExchange().

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

◆ AddListControl()

wxListCtrl * ShuttleGuiBase::AddListControl ( std::initializer_list< const ListControlColumn columns = {},
long  listControlStyles = 0 
)

Definition at line 775 of file ShuttleGui.cpp.

779 {
780  UseUpId();
781  if( mShuttleMode != eIsCreating )
782  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxListCtrl);
783  wxListCtrl * pListCtrl;
784  SetProportions( 1 );
785  mpWind = pListCtrl = safenew wxListCtrl(GetParent(), miId,
786  wxDefaultPosition, wxDefaultSize, GetStyle( wxLC_ICON ));
787  pListCtrl->SetMinSize( wxSize( 120,150 ));
788  UpdateSizers();
789 
790  DoInsertListColumns( pListCtrl, listControlStyles, columns );
791 
792  return pListCtrl;
793 }

References DoInsertListColumns(), eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Referenced by MacroCommandDialog::PopulateOrExchange(), and ExtImportPrefs::PopulateOrExchange().

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

◆ AddListControlReportMode()

wxListCtrl * ShuttleGuiBase::AddListControlReportMode ( std::initializer_list< const ListControlColumn columns = {},
long  listControlStyles = 0 
)

Definition at line 795 of file ShuttleGui.cpp.

799 {
800  UseUpId();
801  if( mShuttleMode != eIsCreating )
802  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxListCtrl);
803  wxListCtrl * pListCtrl;
804  SetProportions( 1 );
805  mpWind = pListCtrl = safenew wxListCtrl(GetParent(), miId,
806  wxDefaultPosition, wxSize(230,120),//wxDefaultSize,
807  GetStyle( wxLC_REPORT | wxLC_HRULES | wxLC_VRULES | wxSUNKEN_BORDER ));
808 // pListCtrl->SetMinSize( wxSize( 120,150 ));
809  UpdateSizers();
810 
811  DoInsertListColumns( pListCtrl, listControlStyles, columns );
812 
813  return pListCtrl;
814 }

References DoInsertListColumns(), eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Referenced by ApplyMacroDialog::OnApplyToFiles(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), and MousePrefs::PopulateOrExchange().

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

◆ AddNumericTextBox()

wxTextCtrl * ShuttleGuiBase::AddNumericTextBox ( const TranslatableString Caption,
const wxString &  Value,
const int  nChars 
)

Definition at line 667 of file ShuttleGui.cpp.

669 {
670  const auto translated = Caption.Translation();
671  HandleOptionality( Caption );
672  AddPrompt( Caption );
673  UseUpId();
674  if( mShuttleMode != eIsCreating )
675  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxTextCtrl);
676  wxTextCtrl * pTextCtrl;
677  wxSize Size(wxDefaultSize);
678  if( nChars > 0 )
679  {
680  Size.SetWidth( nChars *5 );
681  }
682  miProp=0;
683 
684 #ifdef EXPERIMENTAL_RIGHT_ALIGNED_TEXTBOXES
685  long flags = wxTE_RIGHT;
686 #else
687  long flags = wxTE_LEFT;
688 #endif
689 
690  wxTextValidator Validator(wxFILTER_NUMERIC);
691  mpWind = pTextCtrl = safenew wxTextCtrl(GetParent(), miId, Value,
692  wxDefaultPosition, Size, GetStyle( flags ),
693  Validator // It's OK to pass this. It will be cloned.
694  );
695 #if wxUSE_ACCESSIBILITY
696  // so that name can be set on a standard control
697  mpWind->SetAccessible(safenew WindowAccessible(mpWind));
698 #endif
699  mpWind->SetName(wxStripMenuCodes(translated));
700  UpdateSizers();
701  return pTextCtrl;
702 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by DoTieNumericTextBox().

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

◆ AddPrompt()

void ShuttleGuiBase::AddPrompt ( const TranslatableString Prompt,
int  wrapWidth = 0 
)

Right aligned text string.

Definition at line 231 of file ShuttleGui.cpp.

232 {
233  if( mShuttleMode != eIsCreating )
234  return;
235  //wxLogDebug( "Prompt: [%s] Id:%i (%i)", Prompt.c_str(), miId, miIdSetByUser ) ;
236  if( mpbOptionalFlag ){
237  bool * pVar = mpbOptionalFlag;
238  mpbOptionalFlag = nullptr;
239  TieCheckBox( {}, *pVar);
240  //return;
241  }
242  if( Prompt.empty() )
243  return;
244  miProp=1;
245  const auto translated = Prompt.Translation();
246  auto text = safenew wxStaticText(GetParent(), -1, translated, wxDefaultPosition, wxDefaultSize,
247  GetStyle( wxALIGN_RIGHT ));
248  mpWind = text;
249  if (wrapWidth > 0)
250  text->Wrap(wrapWidth);
251  mpWind->SetName(wxStripMenuCodes(translated)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
252  UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL, true );
253 }

References eIsCreating, TranslatableString::empty(), GetParent(), GetStyle(), miProp, mpbOptionalFlag, mpWind, mShuttleMode, safenew, TieCheckBox(), TranslatableString::Translation(), and UpdateSizersCore().

Referenced by AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddNumericTextBox(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), NyquistEffect::BuildEffectWindow(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), VampEffect::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), and QualityPrefs::PopulateOrExchange().

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

◆ AddRadioButton()

wxRadioButton * ShuttleGuiBase::AddRadioButton ( const TranslatableString Prompt,
int  selector = 0,
int  initValue = 0 
)

Definition at line 561 of file ShuttleGui.cpp.

563 {
564  return DoAddRadioButton( Prompt, wxRB_GROUP, selector, initValue );
565 }

References DoAddRadioButton().

Referenced by MeterPanel::OnPreferences(), ExportMultipleDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), and NoiseRemovalDialog::PopulateOrExchange().

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

◆ AddRadioButtonToGroup()

wxRadioButton * ShuttleGuiBase::AddRadioButtonToGroup ( const TranslatableString Prompt,
int  selector = 1,
int  initValue = 0 
)

Definition at line 567 of file ShuttleGui.cpp.

569 {
570  return DoAddRadioButton( Prompt, 0, selector, initValue );
571 }

References DoAddRadioButton().

Referenced by MeterPanel::OnPreferences(), ExportMultipleDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), and NoiseRemovalDialog::PopulateOrExchange().

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

◆ AddReadOnlyText()

ReadOnlyText * ShuttleGuiBase::AddReadOnlyText ( const TranslatableString Caption,
const wxString &  Value 
)

Definition at line 489 of file ShuttleGui.cpp.

491 {
492  const auto translated = Caption.Translation();
493  auto style = GetStyle( wxBORDER_NONE );
494  HandleOptionality( Caption );
495  mItem.miStyle = wxALIGN_CENTER_VERTICAL;
496  AddPrompt( Caption );
497  UseUpId();
498  if( mShuttleMode != eIsCreating )
499  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), ReadOnlyText);
500  ReadOnlyText * pReadOnlyText;
501  miProp=0;
502 
503  mpWind = pReadOnlyText = safenew ReadOnlyText(GetParent(), miId, Value,
504  wxDefaultPosition, wxDefaultSize, GetStyle( style ));
505  mpWind->SetName(wxStripMenuCodes(translated));
506  UpdateSizers();
507  return pReadOnlyText;
508 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, DialogDefinition::Item::miStyle, mItem, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by DirectoriesPrefs::PopulateOrExchange(), and LibraryPrefs::PopulateOrExchange().

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

◆ AddSlider()

wxSlider * ShuttleGuiBase::AddSlider ( const TranslatableString Prompt,
int  pos,
int  Max,
int  Min = 0 
)

Definition at line 582 of file ShuttleGui.cpp.

584 {
585  HandleOptionality( Prompt );
586  AddPrompt( Prompt );
587  UseUpId();
588  if( mShuttleMode != eIsCreating )
589  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxSlider);
590  wxSlider * pSlider;
592  pos, Min, Max,
593  wxDefaultPosition,
594  // Bug2289: On Linux at least, sliders like to be constructed with the
595  // proper size, not reassigned size later
596  ( ( mItem.mWindowSize == wxSize{} ) ? wxDefaultSize : mItem.mWindowSize ),
597  GetStyle( wxSL_HORIZONTAL | wxSL_LABELS | wxSL_AUTOTICKS )
598  );
599 #if wxUSE_ACCESSIBILITY
600  // so that name can be set on a standard control
601  mpWind->SetAccessible(safenew WindowAccessible(mpWind));
602 #endif
603  mpWind->SetName(wxStripMenuCodes(Prompt.Translation()));
604  miProp=1;
605  UpdateSizers();
606  return pSlider;
607 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mItem, mpDlg, mpWind, mShuttleMode, DialogDefinition::Item::mWindowSize, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by DoTieSlider(), ExportMixerDialog::ExportMixerDialog(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), and EffectTimeScale::PopulateOrExchange().

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

◆ AddSpinCtrl()

wxSpinCtrl * ShuttleGuiBase::AddSpinCtrl ( const TranslatableString Prompt,
int  Value,
int  Max,
int  Min 
)

Definition at line 609 of file ShuttleGui.cpp.

611 {
612  const auto translated = Prompt.Translation();
613  HandleOptionality( Prompt );
614  AddPrompt( Prompt );
615  UseUpId();
616  if( mShuttleMode != eIsCreating )
617  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxSpinCtrl);
618  wxSpinCtrl * pSpinCtrl;
619  mpWind = pSpinCtrl = safenew wxSpinCtrl(GetParent(), miId,
620  wxEmptyString,
621  wxDefaultPosition, wxDefaultSize,
622  GetStyle( wxSP_VERTICAL | wxSP_ARROW_KEYS ),
623  Min, Max, Value
624  );
625  mpWind->SetName(wxStripMenuCodes(translated));
626  miProp=1;
627  UpdateSizers();
628  return pSpinCtrl;
629 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by DoTieSpinCtrl().

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

◆ AddTextBox()

wxTextCtrl * ShuttleGuiBase::AddTextBox ( const TranslatableString Caption,
const wxString &  Value,
const int  nChars 
)

Definition at line 631 of file ShuttleGui.cpp.

633 {
634  const auto translated = Caption.Translation();
635  HandleOptionality( Caption );
636  AddPrompt( Caption );
637  UseUpId();
638  if( mShuttleMode != eIsCreating )
639  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxTextCtrl);
640  wxTextCtrl * pTextCtrl;
641  wxSize Size(wxDefaultSize);
642  if( nChars > 0 )
643  {
644  int width;
645  mpDlg->GetTextExtent( wxT("9"), &width, nullptr );
646  Size.SetWidth( nChars * width );
647  }
648  miProp=0;
649 
650 #ifdef EXPERIMENTAL_RIGHT_ALIGNED_TEXTBOXES
651  long flags = wxTE_RIGHT;
652 #else
653  long flags = wxTE_LEFT;
654 #endif
655 
656  mpWind = pTextCtrl = safenew wxTextCtrlWrapper(GetParent(), miId, Value,
657  wxDefaultPosition, Size, GetStyle( flags ));
658 #if wxUSE_ACCESSIBILITY
659  // so that name can be set on a standard control
660  mpWind->SetAccessible(safenew WindowAccessible(mpWind));
661 #endif
662  mpWind->SetName(wxStripMenuCodes(translated));
663  UpdateSizers();
664  return pTextCtrl;
665 }

References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by NyquistEffect::BuildEffectWindow(), DoTieTextBox(), ImportRawDialog::ImportRawDialog(), EffectUIHost::OnSaveAs(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), and VampEffect::PopulateOrExchange().

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

◆ AddTextWindow()

wxTextCtrl * ShuttleGuiBase::AddTextWindow ( const wxString &  Value)

Multiline text box that grows.

Definition at line 705 of file ShuttleGui.cpp.

706 {
707  UseUpId();
708  if( mShuttleMode != eIsCreating )
709  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxTextCtrl);
710  wxTextCtrl * pTextCtrl;
711  SetProportions( 1 );
712  mpWind = pTextCtrl = safenew wxTextCtrl(GetParent(), miId, Value,
713  wxDefaultPosition, wxDefaultSize, GetStyle( wxTE_MULTILINE ));
714 #if wxUSE_ACCESSIBILITY
715  // so that name can be set on a standard control
716  mpWind->SetAccessible(safenew WindowAccessible(mpWind));
717 #endif
718  UpdateSizers();
719  // Start off at start of window...
720  pTextCtrl->SetInsertionPoint( 0 );
721  pTextCtrl->ShowPosition( 0 );
722  return pTextCtrl;
723 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Referenced by ErrorDialog::ErrorDialog(), ExportCL::Export(), LongMessageDialog::Init(), TagsEditorDialog::OnEdit(), MacroCommandDialog::PopulateOrExchange(), AudacityLogger::Show(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), and HelpSystem::ShowInfoDialog().

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

◆ AddTitle()

void ShuttleGuiBase::AddTitle ( const TranslatableString Prompt,
int  wrapWidth = 0 
)

Centred text string.

Definition at line 274 of file ShuttleGui.cpp.

275 {
276  if( Prompt.empty() )
277  return;
278  if( mShuttleMode != eIsCreating )
279  return;
280  const auto translated = Prompt.Translation();
281  auto text = safenew wxStaticText(GetParent(), -1, translated, wxDefaultPosition, wxDefaultSize,
282  GetStyle( wxALIGN_CENTRE ));
283  mpWind = text;
284  if (wrapWidth > 0)
285  text->Wrap(wrapWidth);
286  mpWind->SetName(translated); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
287  UpdateSizers();
288 }

References eIsCreating, TranslatableString::empty(), GetParent(), GetStyle(), mpWind, mShuttleMode, safenew, TranslatableString::Translation(), and UpdateSizers().

Referenced by ExportMP3::AskResample(), ExportFFmpeg::AskResample(), ContrastDialog::ContrastDialog(), ExportPlugin::OptionsCreate(), KeyConfigPrefs::Populate(), ExportCLOptions::PopulateOrExchange(), FindDialog::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), and HelpSystem::ShowInfoDialog().

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

◆ AddTree()

wxTreeCtrl * ShuttleGuiBase::AddTree ( )

Definition at line 847 of file ShuttleGui.cpp.

848 {
849  UseUpId();
850  if( mShuttleMode != eIsCreating )
851  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxTreeCtrl);
852  wxTreeCtrl * pTreeCtrl;
853  SetProportions( 1 );
854  mpWind = pTreeCtrl = safenew wxTreeCtrl(GetParent(), miId, wxDefaultPosition, wxDefaultSize,
855  GetStyle( wxTR_HAS_BUTTONS ));
856  pTreeCtrl->SetMinSize( wxSize( 120,650 ));
857  UpdateSizers();
858  return pTreeCtrl;
859 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Here is the call graph for this function:

◆ AddUnits()

void ShuttleGuiBase::AddUnits ( const TranslatableString Prompt,
int  wrapWidth = 0 
)

Left aligned text string.

Definition at line 256 of file ShuttleGui.cpp.

257 {
258  if( Prompt.empty() )
259  return;
260  if( mShuttleMode != eIsCreating )
261  return;
262  miProp = 1;
263  const auto translated = Prompt.Translation();
264  auto text = safenew wxStaticText(GetParent(), -1, translated, wxDefaultPosition, wxDefaultSize,
265  GetStyle( wxALIGN_LEFT ));
266  mpWind = text;
267  if (wrapWidth > 0)
268  text->Wrap(wrapWidth);
269  mpWind->SetName(translated); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
270  UpdateSizersCore( false, wxALL | wxALIGN_CENTRE_VERTICAL );
271 }

References eIsCreating, TranslatableString::empty(), GetParent(), GetStyle(), miProp, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), and UpdateSizersCore().

Referenced by NyquistEffect::BuildEffectWindow(), ImportRawDialog::ImportRawDialog(), TagsEditorDialog::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), and RecordingPrefs::PopulateOrExchange().

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

◆ AddVariableText()

wxStaticText * ShuttleGuiBase::AddVariableText ( const TranslatableString Str,
bool  bCenter = false,
int  PositionFlags = 0,
int  wrapWidth = 0 
)

Definition at line 456 of file ShuttleGui.cpp.

459 {
460  const auto translated = Str.Translation();
461  UseUpId();
462  if( mShuttleMode != eIsCreating )
463  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxStaticText);
464 
465  wxStaticText *pStatic;
466  auto text = pStatic = safenew wxStaticText(GetParent(), miId, translated,
467  wxDefaultPosition, wxDefaultSize,
468  GetStyle( wxALIGN_LEFT ));
469  mpWind = text;
470  if ( wrapWidth > 0 )
471  text->Wrap( wrapWidth );
472  mpWind->SetName(wxStripMenuCodes(translated)); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
473  if( bCenter )
474  {
475  miProp=1;
476  if( PositionFlags )
477  UpdateSizersCore( false, PositionFlags );
478  else
479  UpdateSizersC();
480  }
481  else
482  if( PositionFlags )
483  UpdateSizersCore( false, PositionFlags );
484  else
485  UpdateSizers();
486  return pStatic;
487 }

References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UpdateSizersC(), UpdateSizersCore(), and UseUpId().

Referenced by NyquistEffect::BuildPromptWindow(), ExportMixerDialog::ExportMixerDialog(), HistoryDialog::Populate(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectRepeat::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), and LibraryPrefs::PopulateOrExchange().

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

◆ AddVSlider()

wxSlider* ShuttleGuiBase::AddVSlider ( const TranslatableString Prompt,
int  pos,
int  Max 
)

◆ AddWindow()

wxWindow * ShuttleGuiBase::AddWindow ( wxWindow *  pWindow)

Very generic 'Add' function. We can add anything we like. Useful for unique controls

Definition at line 292 of file ShuttleGui.cpp.

293 {
294  if( mShuttleMode != eIsCreating )
295  return pWindow;
296  mpWind = pWindow;
297  SetProportions( 0 );
298  UpdateSizersCore(false, wxALIGN_CENTRE | wxALL);
299  return pWindow;
300 }

References eIsCreating, mpWind, mShuttleMode, SetProportions(), and UpdateSizersCore().

Referenced by anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), NyquistEffect::BuildEffectWindow(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), ErrorDialog::ErrorDialog(), ExportMixerDialog::ExportMixerDialog(), LabelTrackMenuTable::OnSetFont(), ExportCL::OptionsCreate(), ExportFFmpeg::OptionsCreate(), ExportFLAC::OptionsCreate(), ExportMP3::OptionsCreate(), ExportOGG::OptionsCreate(), ExportPCM::OptionsCreate(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), LabelDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), PrefsDialog::PrefsDialog(), HelpSystem::ShowHtmlText(), and SliderDialog::SliderDialog().

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

◆ ApplyItem()

void ShuttleGuiBase::ApplyItem ( int  step,
const DialogDefinition::Item item,
wxWindow *  pWind,
wxWindow *  pDlg 
)
static

Definition at line 2061 of file ShuttleGui.cpp.

2063 {
2064  if ( step == 0 ) {
2065  // Do these steps before adding the window to the sizer
2066  if( item.mUseBestSize )
2067  pWind->SetMinSize( pWind->GetBestSize() );
2068  else if( item.mHasMinSize )
2069  pWind->SetMinSize( item.mMinSize );
2070 
2071  if ( item.mWindowSize != wxSize{} )
2072  pWind->SetSize( item.mWindowSize );
2073  }
2074  else if ( step == 1) {
2075  // Apply certain other optional window attributes here
2076 
2077  if ( item.mValidatorSetter )
2078  item.mValidatorSetter( pWind );
2079 
2080  if ( !item.mToolTip.empty() )
2081  pWind->SetToolTip( item.mToolTip.Translation() );
2082 
2083  if ( !item.mName.empty() ) {
2084  pWind->SetName( item.mName.Stripped().Translation() );
2085 #ifndef __WXMAC__
2086  if (auto pButton = dynamic_cast< wxBitmapButton* >( pWind ))
2087  pButton->SetLabel( item.mName.Translation() );
2088 #endif
2089  }
2090 
2091  if ( !item.mNameSuffix.empty() )
2092  pWind->SetName(
2093  pWind->GetName() + " " + item.mNameSuffix.Translation() );
2094 
2095  if (item.mFocused)
2096  pWind->SetFocus();
2097 
2098  if (item.mDisabled)
2099  pWind->Enable( false );
2100 
2101  for (auto &pair : item.mRootConnections)
2102  pWind->Connect( pair.first, pair.second, nullptr, pDlg );
2103  }
2104 }

References TranslatableString::empty(), DialogDefinition::Item::mDisabled, DialogDefinition::Item::mFocused, DialogDefinition::Item::mHasMinSize, DialogDefinition::Item::mMinSize, DialogDefinition::Item::mName, DialogDefinition::Item::mNameSuffix, DialogDefinition::Item::mRootConnections, DialogDefinition::Item::mToolTip, DialogDefinition::Item::mUseBestSize, DialogDefinition::Item::mValidatorSetter, DialogDefinition::Item::mWindowSize, TranslatableString::Stripped(), and TranslatableString::Translation().

Referenced by UpdateSizersCore().

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

◆ DoAddRadioButton()

wxRadioButton * ShuttleGuiBase::DoAddRadioButton ( const TranslatableString Prompt,
int  style,
int  selector,
int  initValue 
)
private

Unwrapped string value.

Todo:
This function and the next two, suitably adapted, could be used by TieRadioButton.

Definition at line 541 of file ShuttleGui.cpp.

543 {
544  const auto translated = Prompt.Translation();
547  UseUpId();
548  if( mShuttleMode != eIsCreating )
549  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxRadioButton);
550  wxRadioButton * pRad;
551  mpWind = pRad = safenew wxRadioButton(GetParent(), miId, translated,
552  wxDefaultPosition, wxDefaultSize, GetStyle( style ) );
553  mpWind->SetName(wxStripMenuCodes(translated));
554  if ( style )
555  pRad->SetValue( true );
556  UpdateSizers();
557  pRad->SetValue( selector == initValue );
558  return pRad;
559 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by AddRadioButton(), and AddRadioButtonToGroup().

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

◆ DoDataShuttle()

void ShuttleGuiBase::DoDataShuttle ( const wxString &  Name,
WrappedType WrappedRef 
)
private

When we're exchanging with the configured shuttle rather than with the GUI We use this function.

Definition at line 1221 of file ShuttleGui.cpp.

1222 {
1223  wxASSERT( mpShuttle );
1224  mpShuttle->TransferWrappedType( Name, WrappedRef );
1225 }

References mpShuttle.

Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), TieCheckBox(), TieCheckBoxOnRight(), TieChoice(), TieIntegerTextBox(), TieNumericTextBox(), TieSlider(), TieSpinCtrl(), and TieTextBox().

Here is the caller graph for this function:

◆ DoInsertListColumns()

void ShuttleGuiBase::DoInsertListColumns ( wxListCtrl *  pListCtrl,
long  listControlStyles,
std::initializer_list< const ListControlColumn columns 
)
private

Definition at line 816 of file ShuttleGui.cpp.

820 {
821  // Old comment from HistoryWindow.cpp follows
822  // -- is it still correct for wxWidgets 3?
823 
824  // Do this BEFORE inserting the columns. On the Mac at least, the
825  // columns are deleted and later InsertItem()s will cause Audacity to crash.
826  for ( auto style = 1l; style <= listControlStyles; style <<= 1 )
827  if ( (style & listControlStyles) )
828  pListCtrl->SetSingleStyle(style, true);
829 
830  long iCol = 0;
831  bool dummyColumn =
832  columns.size() > 0 && begin(columns)->format == wxLIST_FORMAT_RIGHT;
833 
834  //A dummy first column, which is then deleted, is a workaround -
835  // under Windows the first column can't be right aligned.
836  if (dummyColumn)
837  pListCtrl->InsertColumn( iCol++, wxString{} );
838 
839  for (auto &column : columns)
840  pListCtrl->InsertColumn(
841  iCol++, column.heading.Translation(), column.format, column.width );
842 
843  if (dummyColumn)
844  pListCtrl->DeleteColumn( 0 );
845 }

Referenced by AddListControl(), and AddListControlReportMode().

Here is the caller graph for this function:

◆ DoStep()

bool ShuttleGuiBase::DoStep ( int  iStep)

Code-Condenser function.

We have functions which need to do:

// Either: Values are coming in:
DoDataShuttle( SettingName, WrappedRef );
TieMyControl( Prompt, WrappedRef );
// Or: Values are going out:
TieMyControl( Prompt, WrappedRef );
DoDataShuttle( SettingName, WrappedRef );

So we make a list of all the possible steps, and have DoStep choose which ones are actually done, like this:

if( DoStep(1) ) DoFirstThing();
if( DoStep(2) ) DoSecondThing();
if( DoStep(3) ) DoThirdThing();

The repeated choice logic can then be taken out of those functions.

JKC: This paves the way for doing data validation too, though when we add that we will need to renumber the steps.

Definition at line 1791 of file ShuttleGui.cpp.

1792 {
1793  // Get value and create
1794  if( mShuttleMode == eIsCreating )
1795  {
1796  return (iStep==1) || (iStep==2);
1797  }
1798  // Like creating, get the value and set.
1800  {
1801  return (iStep==1) || (iStep==2);
1802  }
1804  {
1805  return (iStep==2) || (iStep==3);
1806  }
1808  return iStep ==2;
1809  wxASSERT( false );
1810  return false;
1811 }

References eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, and mShuttleMode.

Referenced by TieCheckBox(), TieCheckBoxOnRight(), TieChoice(), TieIntegerTextBox(), TieNumericTextBox(), TieSlider(), TieSpinCtrl(), and TieTextBox().

Here is the caller graph for this function:

◆ DoTieCheckBox()

wxCheckBox * ShuttleGuiBase::DoTieCheckBox ( const TranslatableString Prompt,
WrappedType WrappedRef 
)
private

Definition at line 1233 of file ShuttleGui.cpp.

1234 {
1235  HandleOptionality( Prompt );
1236  // The Add function does a UseUpId(), so don't do it here in that case.
1237  if( mShuttleMode == eIsCreating )
1238  return AddCheckBox( Prompt, WrappedRef.ReadAsString() == wxT("true"));
1239 
1240  UseUpId();
1241 
1242  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1243  wxCheckBox * pCheckBox = wxDynamicCast(pWnd, wxCheckBox);
1244 
1245  switch( mShuttleMode )
1246  {
1247  // IF setting internal storage from the controls.
1248  case eIsGettingMetadata:
1249  break;
1250  case eIsGettingFromDialog:
1251  {
1252  wxASSERT( pCheckBox );
1253  WrappedRef.WriteToAsBool( pCheckBox->GetValue() );
1254  }
1255  break;
1256  case eIsSettingToDialog:
1257  {
1258  wxASSERT( pCheckBox );
1259  pCheckBox->SetValue( WrappedRef.ReadAsBool() );
1260  }
1261  break;
1262  default:
1263  wxASSERT( false );
1264  break;
1265  }
1266  return pCheckBox;
1267 }

References AddCheckBox(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsBool(), WrappedType::ReadAsString(), UseUpId(), and WrappedType::WriteToAsBool().

Referenced by TieCheckBox(), and TieCheckBoxOnRight().

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

◆ DoTieCheckBoxOnRight()

wxCheckBox * ShuttleGuiBase::DoTieCheckBoxOnRight ( const TranslatableString Prompt,
WrappedType WrappedRef 
)
private

Definition at line 1269 of file ShuttleGui.cpp.

1270 {
1271  HandleOptionality( Prompt );
1272  // The Add function does a UseUpId(), so don't do it here in that case.
1273  if( mShuttleMode == eIsCreating )
1274  return AddCheckBoxOnRight( Prompt, WrappedRef.ReadAsString() == wxT("true"));
1275 
1276  UseUpId();
1277 
1278  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1279  wxCheckBox * pCheckBox = wxDynamicCast(pWnd, wxCheckBox);
1280 
1281  switch( mShuttleMode )
1282  {
1283  // IF setting internal storage from the controls.
1284  case eIsGettingMetadata:
1285  break;
1286  case eIsGettingFromDialog:
1287  {
1288  wxASSERT( pCheckBox );
1289  WrappedRef.WriteToAsBool( pCheckBox->GetValue() );
1290  }
1291  break;
1292  case eIsSettingToDialog:
1293  {
1294  wxASSERT( pCheckBox );
1295  pCheckBox->SetValue( WrappedRef.ReadAsBool() );
1296  }
1297  break;
1298  default:
1299  wxASSERT( false );
1300  break;
1301  }
1302  return pCheckBox;
1303 }

References AddCheckBoxOnRight(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsBool(), WrappedType::ReadAsString(), UseUpId(), and WrappedType::WriteToAsBool().

Referenced by TieCheckBoxOnRight().

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

◆ DoTieNumericTextBox()

wxTextCtrl * ShuttleGuiBase::DoTieNumericTextBox ( const TranslatableString Prompt,
WrappedType WrappedRef,
const int  nChars 
)
private

Definition at line 1382 of file ShuttleGui.cpp.

1384 {
1385  HandleOptionality( Prompt );
1386  // The Add function does a UseUpId(), so don't do it here in that case.
1387  if( mShuttleMode == eIsCreating )
1388  return AddNumericTextBox( Prompt, WrappedRef.ReadAsString(), nChars );
1389 
1390  UseUpId();
1391  wxTextCtrl * pTextBox=NULL;
1392 
1393  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1394  pTextBox = wxDynamicCast(pWnd, wxTextCtrl);
1395 
1396  switch( mShuttleMode )
1397  {
1398  // IF setting internal storage from the controls.
1399  case eIsGettingMetadata:
1400  break;
1401  case eIsGettingFromDialog:
1402  {
1403  wxASSERT( pTextBox );
1404  WrappedRef.WriteToAsString( pTextBox->GetValue() );
1405  }
1406  break;
1407  case eIsSettingToDialog:
1408  {
1409  wxASSERT( pTextBox );
1410  pTextBox->SetValue( WrappedRef.ReadAsString() );
1411  }
1412  break;
1413  default:
1414  wxASSERT( false );
1415  break;
1416  }
1417  return pTextBox;
1418 }

References AddNumericTextBox(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsString(), UseUpId(), and WrappedType::WriteToAsString().

Referenced by TieIntegerTextBox(), and TieNumericTextBox().

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

◆ DoTieSlider()

wxSlider * ShuttleGuiBase::DoTieSlider ( const TranslatableString Prompt,
WrappedType WrappedRef,
const int  max,
const int  min = 0 
)
private

Definition at line 1420 of file ShuttleGui.cpp.

1423 {
1424  HandleOptionality( Prompt );
1425  // The Add function does a UseUpId(), so don't do it here in that case.
1426  if( mShuttleMode != eIsCreating )
1427  UseUpId();
1428  wxSlider * pSlider=NULL;
1429  switch( mShuttleMode )
1430  {
1431  case eIsCreating:
1432  {
1433  pSlider = AddSlider( Prompt, WrappedRef.ReadAsInt(), max, min );
1434  }
1435  break;
1436  // IF setting internal storage from the controls.
1437  case eIsGettingMetadata:
1438  break;
1439  case eIsGettingFromDialog:
1440  {
1441  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1442  pSlider = wxDynamicCast(pWnd, wxSlider);
1443  wxASSERT( pSlider );
1444  WrappedRef.WriteToAsInt( pSlider->GetValue() );
1445  }
1446  break;
1447  case eIsSettingToDialog:
1448  {
1449  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1450  pSlider = wxDynamicCast(pWnd, wxSlider);
1451  wxASSERT( pSlider );
1452  pSlider->SetValue( WrappedRef.ReadAsInt() );
1453  }
1454  break;
1455  default:
1456  wxASSERT( false );
1457  break;
1458  }
1459  return pSlider;
1460 }

References AddSlider(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, min(), mpDlg, mShuttleMode, WrappedType::ReadAsInt(), UseUpId(), and WrappedType::WriteToAsInt().

Referenced by TieSlider().

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

◆ DoTieSpinCtrl()

wxSpinCtrl * ShuttleGuiBase::DoTieSpinCtrl ( const TranslatableString Prompt,
WrappedType WrappedRef,
const int  max,
const int  min = 0 
)
private

Definition at line 1305 of file ShuttleGui.cpp.

1308 {
1309  HandleOptionality( Prompt );
1310  // The Add function does a UseUpId(), so don't do it here in that case.
1311  if( mShuttleMode == eIsCreating )
1312  return AddSpinCtrl( Prompt, WrappedRef.ReadAsInt(), max, min );
1313 
1314  UseUpId();
1315  wxSpinCtrl * pSpinCtrl=NULL;
1316 
1317  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1318  pSpinCtrl = wxDynamicCast(pWnd, wxSpinCtrl);
1319 
1320  switch( mShuttleMode )
1321  {
1322  // IF setting internal storage from the controls.
1323  case eIsGettingMetadata:
1324  break;
1325  case eIsGettingFromDialog:
1326  {
1327  wxASSERT( pSpinCtrl );
1328  WrappedRef.WriteToAsInt( pSpinCtrl->GetValue() );
1329  }
1330  break;
1331  case eIsSettingToDialog:
1332  {
1333  wxASSERT( pSpinCtrl );
1334  pSpinCtrl->SetValue( WrappedRef.ReadAsInt() );
1335  }
1336  break;
1337  default:
1338  wxASSERT( false );
1339  break;
1340  }
1341  return pSpinCtrl;
1342 }

References AddSpinCtrl(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, min(), mpDlg, mShuttleMode, WrappedType::ReadAsInt(), UseUpId(), and WrappedType::WriteToAsInt().

Referenced by TieSpinCtrl().

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

◆ DoTieTextBox()

wxTextCtrl * ShuttleGuiBase::DoTieTextBox ( const TranslatableString Prompt,
WrappedType WrappedRef,
const int  nChars 
)
private

Definition at line 1344 of file ShuttleGui.cpp.

1346 {
1347  HandleOptionality( Prompt );
1348  // The Add function does a UseUpId(), so don't do it here in that case.
1349  if( mShuttleMode == eIsCreating )
1350  return AddTextBox( Prompt, WrappedRef.ReadAsString(), nChars );
1351 
1352  UseUpId();
1353  wxTextCtrl * pTextBox=NULL;
1354 
1355  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1356  pTextBox = wxDynamicCast(pWnd, wxTextCtrl);
1357 
1358  switch( mShuttleMode )
1359  {
1360  // IF setting internal storage from the controls.
1361  case eIsGettingMetadata:
1362  break;
1363  case eIsGettingFromDialog:
1364  {
1365  wxASSERT( pTextBox );
1366  WrappedRef.WriteToAsString( pTextBox->GetValue() );
1367  }
1368  break;
1369  case eIsSettingToDialog:
1370  {
1371  wxASSERT( pTextBox );
1372  pTextBox->SetValue( WrappedRef.ReadAsString() );
1373  }
1374  break;
1375  default:
1376  wxASSERT( false );
1377  break;
1378  }
1379  return pTextBox;
1380 }

References AddTextBox(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsString(), UseUpId(), and WrappedType::WriteToAsString().

Referenced by TieTextBox().

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

◆ EndHorizontalLay()

void ShuttleGuiBase::EndHorizontalLay ( )

Definition at line 1170 of file ShuttleGui.cpp.

1171 {
1172  if( mShuttleMode != eIsCreating )
1173  return;
1174  PopSizer();
1175 }

References eIsCreating, mShuttleMode, and PopSizer().

Referenced by ApplyMacroDialog::ApplyMacroToProject(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), ErrorDialog::ErrorDialog(), ExportMixerDialog::ExportMixerDialog(), BenchmarkDialog::MakeBenchmarkDialog(), ApplyMacroDialog::OnApplyToFiles(), MeterPanel::OnPreferences(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), EffectUIHost::OnSaveAs(), ExportPlugin::OptionsCreate(), FrequencyPlotDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAC3Options::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegAMRNBOptions::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFFmpegWMAOptions::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportFLACOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectRepeat::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), PrefsDialog::PrefsDialog(), AudacityLogger::Show(), DeviceToolBar::ShowComboDialog(), HelpSystem::ShowHtmlText(), HelpSystem::ShowInfoDialog(), and AudacityFileConfig::Warn().

Here is the call graph for this function:

◆ EndInvisiblePanel()

void ShuttleGuiBase::EndInvisiblePanel ( )

Definition at line 1148 of file ShuttleGui.cpp.

1149 {
1150  EndPanel();
1151 }

References EndPanel().

Here is the call graph for this function:

◆ EndMultiColumn()

void ShuttleGuiBase::EndMultiColumn ( )

Definition at line 1212 of file ShuttleGui.cpp.

1213 {
1214  if( mShuttleMode != eIsCreating )
1215  return;
1216  PopSizer();
1217 }

References eIsCreating, mShuttleMode, and PopSizer().

Referenced by NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), ImportRawDialog::ImportRawDialog(), BenchmarkDialog::MakeBenchmarkDialog(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAC3Options::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegAMRNBOptions::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFFmpegWMAOptions::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportFLACOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimerRecordDialog::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(), SetTrackStatusCommand::PopulateOrExchange(), SetTrackAudioCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEcho::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectFindClipping::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectPaulstretch::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectRepeat::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), and SetTrackNameCommand::PopulateOrExchange().

Here is the call graph for this function:

◆ EndNotebook()

void ShuttleGuiBase::EndNotebook ( )

Definition at line 1033 of file ShuttleGui.cpp.

1034 {
1035  //PopSizer();
1036  mpParent = mpParent->GetParent();
1037 }

References mpParent.

◆ EndNotebookPage()

void ShuttleGuiBase::EndNotebookPage ( )

Definition at line 1084 of file ShuttleGui.cpp.

1085 {
1086  if( mShuttleMode != eIsCreating )
1087  return;
1088  PopSizer();
1089  mpParent = mpParent->GetParent();
1090 }

References eIsCreating, mpParent, mShuttleMode, and PopSizer().

Referenced by Exporter::CreateUserPane(), ExportMultipleDialog::PopulateOrExchange(), and EffectLoudness::PopulateOrExchange().

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

◆ EndPanel()

void ShuttleGuiBase::EndPanel ( )

Definition at line 1011 of file ShuttleGui.cpp.

1012 {
1013  if( mShuttleMode != eIsCreating )
1014  return;
1015  PopSizer();
1016  mpParent = mpParent->GetParent();
1017 }

References eIsCreating, mpParent, mShuttleMode, and PopSizer().

Referenced by EndInvisiblePanel(), EffectUIHost::OnSaveAs(), ExportMP3Options::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), AudacityLogger::Show(), and HelpSystem::ShowHtmlText().

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

◆ EndRadioButtonGroup()

void ShuttleGuiBase::EndRadioButtonGroup ( )

Call this after any TieRadioButton calls. It's generic too. We don't need type-specific ones.

Definition at line 1586 of file ShuttleGui.cpp.

1587 {
1588  // too few buttons?
1589  wxASSERT( mRadioCount == mRadioSymbols.size() );
1590 
1593  mRadioValue.reset();// Clear it out...
1594  mRadioSettingName = wxT("");
1595  mRadioCount = -1; // So we detect a problem.
1596  mRadioSymbols = {};
1597 }

References DoDataShuttle(), eIsGettingFromDialog, mRadioCount, mRadioSettingName, mRadioSymbols, mRadioValue, mShuttleMode, and Optional< X >::reset().

Referenced by ExportMP3Options::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), and KeyConfigPrefs::PopulateOrExchange().

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

◆ EndScroller()

void ShuttleGuiBase::EndScroller ( )

Definition at line 964 of file ShuttleGui.cpp.

965 {
966  if( mShuttleMode != eIsCreating )
967  return;
968  wxSize ScrollSize = mpSizer->GetMinSize();
969  int yMin = ScrollSize.y+4;
970  int xMin = ScrollSize.x+4;
971  if( yMin > 400)
972  {
973  yMin = 400;
974  xMin+=50;// extra space for vertical scrollbar.
975  }
976 
977  mpParent->SetMinSize( wxSize(xMin, yMin) );
978 
979  PopSizer();
980  mpParent = mpParent->GetParent();
981 }

References eIsCreating, mpParent, mpSizer, mShuttleMode, and PopSizer().

Referenced by NyquistEffect::BuildEffectWindow(), VampEffect::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), WarningsPrefs::PopulateOrExchange(), and WaveformPrefs::PopulateOrExchange().

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

◆ EndSimplebook()

void ShuttleGuiBase::EndSimplebook ( )

Definition at line 1054 of file ShuttleGui.cpp.

1055 {
1056  //PopSizer();
1057  mpParent = mpParent->GetParent();
1058 }

References mpParent.

Referenced by Exporter::CreateUserPane(), ExportMultipleDialog::PopulateOrExchange(), and EffectLoudness::PopulateOrExchange().

Here is the caller graph for this function:

◆ EndStatic()

void ShuttleGuiBase::EndStatic ( )

Definition at line 915 of file ShuttleGui.cpp.

916 {
917  if( mShuttleMode != eIsCreating )
918  return;
919  PopSizer();
920  mpParent = mpParent->GetParent();
921 }

References eIsCreating, mpParent, mShuttleMode, and PopSizer().

Referenced by ApplyMacroDialog::ApplyMacroToProject(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), ApplyMacroDialog::OnApplyToFiles(), MeterPanel::OnPreferences(), KeyConfigPrefs::Populate(), HistoryDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), MousePrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), WarningsPrefs::PopulateOrExchange(), and WaveformPrefs::PopulateOrExchange().

Here is the call graph for this function:

◆ EndThreeColumn()

void ShuttleGuiBase::EndThreeColumn ( )
inline

Definition at line 377 of file ShuttleGui.h.

377 {EndMultiColumn();};

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

Here is the caller graph for this function:

◆ EndTwoColumn()

void ShuttleGuiBase::EndTwoColumn ( )
inline

Definition at line 375 of file ShuttleGui.h.

375 {EndMultiColumn();};

Referenced by anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ImportRawDialog::ImportRawDialog(), ExportMP3Options::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), and WaveformPrefs::PopulateOrExchange().

Here is the caller graph for this function:

◆ EndVerticalLay()

void ShuttleGuiBase::EndVerticalLay ( )

Definition at line 1196 of file ShuttleGui.cpp.

1197 {
1198  if( mShuttleMode != eIsCreating )
1199  return;
1200  PopSizer();
1201 }

References eIsCreating, mShuttleMode, and PopSizer().

Referenced by ShuttleGui::AddStandardButtons(), ExportFFmpeg::AskResample(), NyquistEffect::BuildPromptWindow(), anonymous_namespace{ProjectFileManager.cpp}::CompactDialog::CompactDialog(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ImportRawDialog::ImportRawDialog(), AudacityCommandDialog::Init(), LongMessageDialog::Init(), EffectDialog::Init(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), ApplyMacroDialog::OnApplyToFiles(), TagsEditorDialog::OnEdit(), MeterPanel::OnPreferences(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), EffectUIHost::OnSaveAs(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), KeyConfigPrefs::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), MacroCommandDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAC3Options::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegAMRNBOptions::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFFmpegWMAOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportFLACOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), FFmpegNotFoundDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), PrefsDialog::PrefsDialog(), AudacityLogger::Show(), DeviceToolBar::ShowComboDialog(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowInfoDialog(), SliderDialog::SliderDialog(), AudacityFileConfig::Warn(), and WarningDialog::WarningDialog().

Here is the call graph for this function:

◆ GetParent()

wxWindow* ShuttleGuiBase::GetParent ( )
inline

Definition at line 503 of file ShuttleGui.h.

504  {
505  // This assertion justifies the use of safenew in many places where GetParent()
506  // is used to construct a window
507  wxASSERT(mpParent != NULL);
508  return mpParent;
509  }

Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), AddTextBox(), AddTextWindow(), AddTitle(), AddTree(), AddUnits(), AddVariableText(), NyquistEffect::BuildEffectWindow(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), DoAddRadioButton(), ErrorDialog::ErrorDialog(), ExportMixerDialog::ExportMixerDialog(), LabelTrackMenuTable::OnSetFont(), ExportCL::OptionsCreate(), ExportFFmpeg::OptionsCreate(), ExportFLAC::OptionsCreate(), ExportMP3::OptionsCreate(), ExportOGG::OptionsCreate(), ExportPCM::OptionsCreate(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), LabelDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), Effect::PopulateUI(), AudioUnitEffect::PopulateUI(), LadspaEffect::PopulateUI(), LV2Effect::PopulateUI(), VSTEffect::PopulateUI(), PrefsDialog::PrefsDialog(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowHtmlText(), SliderDialog::SliderDialog(), StartInvisiblePanel(), StartNotebook(), StartNotebookPage(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), and TieRadioButton().

◆ GetSizer()

wxSizer* ShuttleGuiBase::GetSizer ( )
inline

Definition at line 513 of file ShuttleGui.h.

513 {return mpSizer;}

Referenced by EffectEqualization::PopulateOrExchange().

Here is the caller graph for this function:

◆ GetStyle()

long ShuttleGuiBase::GetStyle ( long  Style)
protected

Definition at line 2187 of file ShuttleGui.cpp.

2188 {
2189  if( mItem.miStyle )
2190  style = mItem.miStyle;
2191  mItem.miStyle = 0;
2192  return style;
2193 }

References DialogDefinition::Item::miStyle, and mItem.

Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTitle(), AddTree(), AddUnits(), AddVariableText(), DoAddRadioButton(), StartNotebook(), StartPanel(), StartScroller(), and StartSimplebook().

Here is the caller graph for this function:

◆ HandleOptionality()

void ShuttleGuiBase::HandleOptionality ( const TranslatableString Prompt)

Definition at line 217 of file ShuttleGui.cpp.

218 {
219  // If creating, will be handled by an AddPrompt.
220  if( mShuttleMode == eIsCreating )
221  return;
222  //wxLogDebug( "Optionality: [%s] Id:%i (%i)", Prompt.c_str(), miId, miIdSetByUser ) ;
223  if( mpbOptionalFlag ){
224  bool * pVar = mpbOptionalFlag;
225  mpbOptionalFlag = nullptr;
226  TieCheckBox( Prompt, *pVar);
227  }
228 }

References eIsCreating, mpbOptionalFlag, mShuttleMode, and TieCheckBox().

Referenced by AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddNumericTextBox(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinCtrl(), DoTieTextBox(), and TieChoice().

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

◆ Init()

void ShuttleGuiBase::Init ( bool  vertical,
wxSize  minSize 
)

Definition at line 141 of file ShuttleGui.cpp.

142 {
143  mpShuttle = NULL;
144  mpSizer = NULL;
145  mpWind = NULL;
146  mpSubSizer = NULL;
147 
148  mRadioSettingName = wxT("");
149  mRadioCount = -1;
150 
151  miBorder = 5;
152  miProp=0;
153  miPropSetByUser=-1;
154  miSizerProp=0;
155  mSizerDepth=-1;
156 
157  ResetId();
158 
159  miNoMatchSelector = 0;
160 
161  if( mShuttleMode != eIsCreating )
162  return;
163 
164  mpSizer = mpParent->GetSizer();
165 
166 #if 0
167  if( mpSizer == NULL )
168  {
169  wxWindow * pGrandParent = mpParent->GetParent();
170  if( pGrandParent )
171  {
172  mpSizer = pGrandParent->GetSizer();
173  }
174  }
175 #endif
176 
177  if( !mpSizer )
178  {
179  mpParent->SetSizer(
180  mpSizer = safenew wxBoxSizer(vertical ? wxVERTICAL : wxHORIZONTAL));
181  }
182  PushSizer();
183  mpSizer->SetMinSize(minSize);
184 }

References eIsCreating, miBorder, miNoMatchSelector, miProp, miPropSetByUser, miSizerProp, mpParent, mpShuttle, mpSizer, mpSubSizer, mpWind, mRadioCount, mRadioSettingName, mShuttleMode, mSizerDepth, PushSizer(), ResetId(), and safenew.

Referenced by ShuttleGui::ShuttleGui().

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

◆ PopSizer()

void ShuttleGuiBase::PopSizer ( )
protected

Definition at line 2173 of file ShuttleGui.cpp.

2174 {
2175  mSizerDepth--;
2176  wxASSERT( mSizerDepth >=0 );
2178 }

References mpSizer, mSizerDepth, and pSizerStack.

Referenced by ShuttleGui::AddStandardButtons(), EndHorizontalLay(), EndMultiColumn(), EndNotebookPage(), EndPanel(), EndScroller(), EndStatic(), and EndVerticalLay().

Here is the caller graph for this function:

◆ Prop()

ShuttleGuiBase & ShuttleGuiBase::Prop ( int  iProp)

Definition at line 875 of file ShuttleGui.cpp.

876 {
877  miPropSetByUser = iProp;
878  return *this;
879 }

References miPropSetByUser.

Referenced by ShuttleGui::Prop().

Here is the caller graph for this function:

◆ PushSizer()

void ShuttleGuiBase::PushSizer ( )
protected

Definition at line 2180 of file ShuttleGui.cpp.

2181 {
2182  mSizerDepth++;
2183  wxASSERT( mSizerDepth < nMaxNestedSizers );
2185 }

References mpSizer, mSizerDepth, nMaxNestedSizers, and pSizerStack.

Referenced by Init(), StartInvisiblePanel(), StartNotebookPage(), StartPanel(), StartScroller(), and UpdateSizersCore().

Here is the caller graph for this function:

◆ ResetId()

void ShuttleGuiBase::ResetId ( )

Definition at line 186 of file ShuttleGui.cpp.

187 {
188  miIdSetByUser = -1;
189  miId = -1;
190  miIdNext = 3000;
191 }

References miId, miIdNext, and miIdSetByUser.

Referenced by Init(), and PrefsDialog::ShuttleAll().

Here is the caller graph for this function:

◆ SetBorder()

void ShuttleGuiBase::SetBorder ( int  Border)
inline

Definition at line 497 of file ShuttleGui.h.

497 {miBorder = Border;};

Referenced by ApplyMacroDialog::ApplyMacroToProject(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), ContrastDialog::ContrastDialog(), ErrorDialog::ErrorDialog(), ExportMixerDialog::ExportMixerDialog(), ImportRawDialog::ImportRawDialog(), AudacityCommandDialog::Init(), LongMessageDialog::Init(), EffectDialog::Init(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), RateMenuTable::OnRateOther(), EffectUIHost::OnSaveAs(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), FFmpegNotFoundDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), MousePrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), WarningsPrefs::PopulateOrExchange(), WaveformPrefs::PopulateOrExchange(), HelpSystem::ShowInfoDialog(), AudacityFileConfig::Warn(), and WarningDialog::WarningDialog().

◆ SetProportions()

void ShuttleGuiBase::SetProportions ( int  Default)
protected

Definition at line 2049 of file ShuttleGui.cpp.

2050 {
2051  if( miPropSetByUser >=0 )
2052  {
2054  miPropSetByUser =-1;
2055  return;
2056  }
2057  miProp = Default;
2058 }

References miProp, and miPropSetByUser.

Referenced by AddGrid(), AddListBox(), AddListControl(), AddListControlReportMode(), AddTextWindow(), AddTree(), AddWindow(), StartInvisiblePanel(), StartNotebook(), StartNotebookPage(), StartPanel(), StartScroller(), and StartSimplebook().

Here is the caller graph for this function:

◆ SetSizerProportion()

void ShuttleGuiBase::SetSizerProportion ( int  iProp)
inline

Definition at line 498 of file ShuttleGui.h.

498 {miSizerProp = iProp;};

Referenced by FrequencyPlotDialog::Populate(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), and ExtImportPrefs::PopulateOrExchange().

Here is the caller graph for this function:

◆ SetStretchyCol()

void ShuttleGuiBase::SetStretchyCol ( int  i)

Used to modify an already placed FlexGridSizer to make a column stretchy.

Definition at line 195 of file ShuttleGui.cpp.

196 {
197  if( mShuttleMode != eIsCreating )
198  return;
199  wxFlexGridSizer *pSizer = wxDynamicCast(mpSizer, wxFlexGridSizer);
200  wxASSERT( pSizer );
201  pSizer->AddGrowableCol( i, 1 );
202 }

References eIsCreating, mpSizer, and mShuttleMode.

Referenced by NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), SplashDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), SelectTimeCommand::PopulateOrExchange(), SelectFrequenciesCommand::PopulateOrExchange(), SelectTracksCommand::PopulateOrExchange(), SetTrackBase::PopulateOrExchange(), SetTrackStatusCommand::PopulateOrExchange(), SetTrackAudioCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), VampEffect::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), and SpectrumPrefs::PopulateOrExchange().

Here is the caller graph for this function:

◆ SetStretchyRow()

void ShuttleGuiBase::SetStretchyRow ( int  i)

Used to modify an already placed FlexGridSizer to make a row stretchy.

Definition at line 205 of file ShuttleGui.cpp.

206 {
207  if( mShuttleMode != eIsCreating )
208  return;
209  wxFlexGridSizer *pSizer = wxDynamicCast(mpSizer, wxFlexGridSizer);
210  wxASSERT( pSizer );
211  pSizer->AddGrowableRow( i, 1 );
212 }

References eIsCreating, mpSizer, and mShuttleMode.

Referenced by LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), ExportFFmpegOptions::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), and EffectScienFilter::PopulateOrExchange().

Here is the caller graph for this function:

◆ StartHorizontalLay()

void ShuttleGuiBase::StartHorizontalLay ( int  PositionFlags = wxALIGN_CENTRE,
int  iProp = 1 
)

Starts a Horizontal Layout.

  • Use wxEXPAND and 0 to expand horizontally but not vertically.
  • Use wxEXPAND and 1 to expand horizontally and vertically.
  • Use wxCENTRE and 1 for no expansion.
    Parameters
    PositionFlagTypically wxEXPAND or wxALIGN_CENTER.
    iPropProportionality for resizing.

Definition at line 1160 of file ShuttleGui.cpp.

1161 {
1162  if( mShuttleMode != eIsCreating )
1163  return;
1164  miSizerProp=iProp;
1165  mpSubSizer = std::make_unique<wxBoxSizer>( wxHORIZONTAL );
1166  // PRL: wxALL has no effect because UpdateSizersCore ignores border
1167  UpdateSizersCore( false, PositionFlags | wxALL );
1168 }

References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().

Referenced by ApplyMacroDialog::ApplyMacroToProject(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), ErrorDialog::ErrorDialog(), ExportCL::Export(), ExportMixerDialog::ExportMixerDialog(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), ApplyMacroDialog::OnApplyToFiles(), MeterPanel::OnPreferences(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), EffectUIHost::OnSaveAs(), ExportPlugin::OptionsCreate(), FrequencyPlotDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAC3Options::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegAMRNBOptions::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFFmpegWMAOptions::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportFLACOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectRepeat::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), PrefsDialog::PrefsDialog(), AudacityLogger::Show(), DeviceToolBar::ShowComboDialog(), HelpSystem::ShowHtmlText(), HelpSystem::ShowInfoDialog(), and AudacityFileConfig::Warn().

Here is the call graph for this function:

◆ StartInvisiblePanel()

wxPanel * ShuttleGuiBase::StartInvisiblePanel ( )

Definition at line 1125 of file ShuttleGui.cpp.

1126 {
1127  UseUpId();
1128  if( mShuttleMode != eIsCreating )
1129  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxPanel);
1130  wxPanel * pPanel;
1131  mpWind = pPanel = safenew wxPanelWrapper(GetParent(), miId, wxDefaultPosition, wxDefaultSize,
1132  wxNO_BORDER);
1133 
1134  mpWind->SetBackgroundColour(
1135  wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)
1136  );
1137  SetProportions( 1 );
1138  miBorder=0;
1139  UpdateSizers(); // adds window in to current sizer.
1140 
1141  // create a sizer within the window...
1142  mpParent = pPanel;
1143  pPanel->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
1144  PushSizer();
1145  return pPanel;
1146 }

References eIsCreating, GetParent(), miBorder, miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), and UseUpId().

Here is the call graph for this function:

◆ StartMultiColumn()

void ShuttleGuiBase::StartMultiColumn ( int  nCols,
int  PositionFlags = wxALIGN_LEFT 
)

Definition at line 1203 of file ShuttleGui.cpp.

1204 {
1205  if( mShuttleMode != eIsCreating )
1206  return;
1207  mpSubSizer = std::make_unique<wxFlexGridSizer>( nCols );
1208  // PRL: wxALL has no effect because UpdateSizersCore ignores border
1209  UpdateSizersCore( false, PositionFlags | wxALL );
1210 }

References eIsCreating, mpSubSizer, mShuttleMode, and UpdateSizersCore().

Referenced by NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), ImportRawDialog::ImportRawDialog(), BenchmarkDialog::MakeBenchmarkDialog(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), MacroCommandDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAC3Options::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegAMRNBOptions::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFFmpegWMAOptions::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportFLACOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimerRecordDialog::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(), SetTrackStatusCommand::PopulateOrExchange(), SetTrackAudioCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEcho::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectFindClipping::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectPaulstretch::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), EffectRepeat::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), and SetTrackNameCommand::PopulateOrExchange().

Here is the call graph for this function:

◆ StartNotebook()

wxNotebook * ShuttleGuiBase::StartNotebook ( )

Definition at line 1019 of file ShuttleGui.cpp.

1020 {
1021  UseUpId();
1022  if( mShuttleMode != eIsCreating )
1023  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxNotebook);
1024  wxNotebook * pNotebook;
1025  mpWind = pNotebook = safenew wxNotebook(GetParent(),
1026  miId, wxDefaultPosition, wxDefaultSize, GetStyle( 0 ));
1027  SetProportions( 1 );
1028  UpdateSizers();
1029  mpParent = pNotebook;
1030  return pNotebook;
1031 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpParent, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Here is the call graph for this function:

◆ StartNotebookPage()

wxNotebookPage * ShuttleGuiBase::StartNotebookPage ( const TranslatableString Name)

Definition at line 1061 of file ShuttleGui.cpp.

1063 {
1064  if( mShuttleMode != eIsCreating )
1065  return NULL;
1066 // return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
1067  auto pNotebook = static_cast< wxBookCtrlBase* >( mpParent );
1069  const auto translated = Name.Translation();
1070  pPage->SetName(translated);
1071 
1072  pNotebook->AddPage(
1073  pPage,
1074  translated);
1075 
1076  SetProportions( 1 );
1077  mpParent = pPage;
1078  pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
1079  PushSizer();
1080  // UpdateSizers();
1081  return pPage;
1082 }

References eIsCreating, GetParent(), mpParent, mpSizer, mShuttleMode, PushSizer(), safenew, SetProportions(), and TranslatableString::Translation().

Referenced by Exporter::CreateUserPane(), ExportMultipleDialog::PopulateOrExchange(), and EffectLoudness::PopulateOrExchange().

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

◆ StartPanel()

wxPanel * ShuttleGuiBase::StartPanel ( int  iStyle = 0)

Definition at line 983 of file ShuttleGui.cpp.

984 {
985  UseUpId();
986  if( mShuttleMode != eIsCreating )
987  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxPanel);
988  wxPanel * pPanel;
989  mpWind = pPanel = safenew wxPanelWrapper( GetParent(), miId, wxDefaultPosition, wxDefaultSize,
990  GetStyle( wxNO_BORDER ));
991 
992  if( iStyle != 0 )
993  {
994  mpWind->SetBackgroundColour(
995  iStyle==1
996  ? wxColour( 190,200,230) :
997  wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)
998  );
999  }
1000  SetProportions(0);
1001  miBorder=2;
1002  UpdateSizers(); // adds window in to current sizer.
1003 
1004  // create a sizer within the window...
1005  mpParent = pPanel;
1006  pPanel->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
1007  PushSizer();
1008  return pPanel;
1009 }

References eIsCreating, GetParent(), GetStyle(), miBorder, miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), and UseUpId().

Referenced by EffectUIHost::OnSaveAs(), ExportMP3Options::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), AudacityLogger::Show(), and HelpSystem::ShowHtmlText().

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

◆ StartRadioButtonGroup()

void ShuttleGuiBase::StartRadioButtonGroup ( const ChoiceSetting Setting)

Call this before any TieRadioButton calls.

Definition at line 1569 of file ShuttleGui.cpp.

1570 {
1571  mRadioSymbols = Setting.GetSymbols();
1572 
1573  // Configure the generic type mechanism to use OUR string.
1574  mRadioValueString = Setting.Default().Internal();
1576 
1577  // Now actually start the radio button group.
1578  mRadioSettingName = Setting.Key();
1579  mRadioCount = 0;
1580  if( mShuttleMode == eIsCreating )
1581  DoDataShuttle( Setting.Key(), *mRadioValue );
1582 }

References ChoiceSetting::Default(), DoDataShuttle(), eIsCreating, Optional< X >::emplace(), ChoiceSetting::GetSymbols(), ComponentInterfaceSymbol::Internal(), ChoiceSetting::Key(), mRadioCount, mRadioSettingName, mRadioSymbols, mRadioValue, mRadioValueString, and mShuttleMode.

Referenced by ExportMP3Options::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), and KeyConfigPrefs::PopulateOrExchange().

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

◆ StartScroller()

wxScrolledWindow * ShuttleGuiBase::StartScroller ( int  iStyle = 0)

This allows subsequent controls and static boxes to be in a scrolled panel. Very handy if you are running out of space on a dialog.

The iStyle parameter is used in some very hacky code that dynamically repopulates a dialog. It also controls the background colour. Look at the code for details.

Parameters
istyledeprecated parameter, but has been used for hacking.

Definition at line 931 of file ShuttleGui.cpp.

932 {
933  UseUpId();
934  if( mShuttleMode != eIsCreating )
935  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxScrolledWindow);
936 
937  wxScrolledWindow * pScroller;
938  mpWind = pScroller = safenew wxScrolledWindow(GetParent(), miId, wxDefaultPosition, wxDefaultSize,
939  GetStyle( wxSUNKEN_BORDER ) );
940  pScroller->SetScrollRate( 20,20 );
941 
942  // This fools NVDA into not saying "Panel" when the dialog gets focus
943  pScroller->SetName(wxT("\a"));
944  pScroller->SetLabel(wxT("\a"));
945 
946  SetProportions( 1 );
947  if( iStyle==2 )
948  {
950  }
951  else
952  {
953  // mpWind->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR));
954  UpdateSizers(); // adds window in to current sizer.
955  }
956 
957  // create a sizer within the window...
958  mpParent = pScroller;
959  pScroller->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
960  PushSizer();
961  return pScroller;
962 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), UpdateSizersAtStart(), and UseUpId().

Referenced by NyquistEffect::BuildEffectWindow(), VampEffect::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), WarningsPrefs::PopulateOrExchange(), and WaveformPrefs::PopulateOrExchange().

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

◆ StartSimplebook()

wxSimplebook * ShuttleGuiBase::StartSimplebook ( )

Definition at line 1040 of file ShuttleGui.cpp.

1041 {
1042  UseUpId();
1043  if( mShuttleMode != eIsCreating )
1044  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxSimplebook);
1045  wxSimplebook * pNotebook;
1046  mpWind = pNotebook = safenew wxSimplebook(GetParent(),
1047  miId, wxDefaultPosition, wxDefaultSize, GetStyle( 0 ));
1048  SetProportions( 1 );
1049  UpdateSizers();
1050  mpParent = pNotebook;
1051  return pNotebook;
1052 }

References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpParent, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().

Referenced by Exporter::CreateUserPane(), ExportMultipleDialog::PopulateOrExchange(), and EffectLoudness::PopulateOrExchange().

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

◆ StartStatic()

wxStaticBox * ShuttleGuiBase::StartStatic ( const TranslatableString Str,
int  iProp = 0 
)

Starts a static box around a number of controls.

Parameters
StrThe text of the title for the box.
iPropThe resizing proportion value. Use iProp == 0 for a minimum sized static box. Use iProp == 1 for a box that grows if there is space to spare.

Definition at line 886 of file ShuttleGui.cpp.

887 {
888  UseUpId();
889  if( mShuttleMode != eIsCreating )
890  return NULL;
891  auto translated = Str.Translation();
892  wxStaticBox * pBox = safenew wxStaticBoxWrapper(
893  GetParent(), miId, translated );
894  pBox->SetLabel( translated );
895  if (Str.empty()) {
896  // NVDA 2018.3 or later does not read the controls in a group box which has
897  // an accessibility name which is empty. Bug 2169.
898 #if wxUSE_ACCESSIBILITY
899  // so that name can be set on a standard control
900  pBox->SetAccessible(safenew WindowAccessible(pBox));
901 #endif
902  pBox->SetName(wxT("\a")); // non-empty string which screen readers do not read
903  }
904  else
905  pBox->SetName( wxStripMenuCodes( translated ) );
906  mpSubSizer = std::make_unique<wxStaticBoxSizer>(
907  pBox,
908  wxVERTICAL );
909  miSizerProp = iProp;
910  UpdateSizers();
911  mpParent = pBox;
912  return pBox;
913 }

References eIsCreating, TranslatableString::empty(), GetParent(), miId, miSizerProp, mpParent, mpSubSizer, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().

Referenced by ApplyMacroDialog::ApplyMacroToProject(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), ApplyMacroDialog::OnApplyToFiles(), MeterPanel::OnPreferences(), KeyConfigPrefs::Populate(), HistoryDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), ScreenshotBigDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), NoiseRemovalDialog::PopulateOrExchange(), EffectTimeScale::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), VampEffect::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), MousePrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), WarningsPrefs::PopulateOrExchange(), and WaveformPrefs::PopulateOrExchange().

Here is the call graph for this function:

◆ StartThreeColumn()

void ShuttleGuiBase::StartThreeColumn ( )
inline

Definition at line 376 of file ShuttleGui.h.

376 {StartMultiColumn(3);};

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

Here is the caller graph for this function:

◆ StartTwoColumn()

void ShuttleGuiBase::StartTwoColumn ( )
inline

Definition at line 374 of file ShuttleGui.h.

374 {StartMultiColumn(2);};

Referenced by anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ImportRawDialog::ImportRawDialog(), ExportMP3Options::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), and WaveformPrefs::PopulateOrExchange().

Here is the caller graph for this function:

◆ StartVerticalLay() [1/2]

void ShuttleGuiBase::StartVerticalLay ( int  iProp = 1)

Definition at line 1177 of file ShuttleGui.cpp.

1178 {
1179  if( mShuttleMode != eIsCreating )
1180  return;
1181  miSizerProp=iProp;
1182  mpSubSizer = std::make_unique<wxBoxSizer>( wxVERTICAL );
1183  UpdateSizers();
1184 }

References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizers().

Referenced by ShuttleGui::AddStandardButtons(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), NyquistEffect::BuildPromptWindow(), anonymous_namespace{ProjectFileManager.cpp}::CompactDialog::CompactDialog(), anonymous_namespace{EffectManager.cpp}::EffectPresetsDialog::EffectPresetsDialog(), ImportRawDialog::ImportRawDialog(), AudacityCommandDialog::Init(), LongMessageDialog::Init(), EffectDialog::Init(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), ApplyMacroDialog::OnApplyToFiles(), TagsEditorDialog::OnEdit(), MeterPanel::OnPreferences(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), EffectUIHost::OnSaveAs(), LabelTrackMenuTable::OnSetFont(), FrequencyPlotDialog::Populate(), KeyConfigPrefs::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), MacroCommandDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), AudioUnitEffectImportDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegAC3Options::PopulateOrExchange(), ExportFFmpegAACOptions::PopulateOrExchange(), ExportFFmpegAMRNBOptions::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFFmpegWMAOptions::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportFLACOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), FindDialog::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), FindFFmpegDialog::PopulateOrExchange(), FFmpegNotFoundDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), TagsEditorDialog::PopulateOrExchange(), TimeDialog::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectAutoDuck::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNormalize::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectSilence::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), PrefsDialog::PrefsDialog(), AudacityLogger::Show(), DeviceToolBar::ShowComboDialog(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowInfoDialog(), SliderDialog::SliderDialog(), AudacityFileConfig::Warn(), and WarningDialog::WarningDialog().

Here is the call graph for this function:

◆ StartVerticalLay() [2/2]

void ShuttleGuiBase::StartVerticalLay ( int  PositionFlags,
int  iProp 
)

Definition at line 1186 of file ShuttleGui.cpp.

1187 {
1188  if( mShuttleMode != eIsCreating )
1189  return;
1190  miSizerProp=iProp;
1191  mpSubSizer = std::make_unique<wxBoxSizer>( wxVERTICAL );
1192  // PRL: wxALL has no effect because UpdateSizersCore ignores border
1193  UpdateSizersCore( false, PositionFlags | wxALL );
1194 }

References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().

Here is the call graph for this function:

◆ TieCheckBox() [1/2]

wxCheckBox * ShuttleGuiBase::TieCheckBox ( const TranslatableString Prompt,
bool &  Var 
)

Definition at line 1603 of file ShuttleGui.cpp.

1604 {
1605  WrappedType WrappedRef( Var );
1606  return DoTieCheckBox( Prompt, WrappedRef );
1607 }

References DoTieCheckBox().

Referenced by AddPrompt(), HandleOptionality(), AudioUnitEffectOptionsDialog::PopulateOrExchange(), LadspaEffectOptionsDialog::PopulateOrExchange(), LV2EffectSettingsDialog::PopulateOrExchange(), VSTEffectOptionsDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), OpenProjectCommand::PopulateOrExchange(), SaveProjectCommand::PopulateOrExchange(), SetPreferenceCommand::PopulateOrExchange(), ScreenshotCommand::PopulateOrExchange(), SetEnvelopeCommand::PopulateOrExchange(), SetLabelCommand::PopulateOrExchange(), SetProjectCommand::PopulateOrExchange(), SetTrackStatusCommand::PopulateOrExchange(), SetTrackAudioCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), BatchPrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ImportExportPrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), WarningsPrefs::PopulateOrExchange(), WaveformPrefs::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieCheckBox().

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

◆ TieCheckBox() [2/2]

wxCheckBox * ShuttleGuiBase::TieCheckBox ( const TranslatableString Prompt,
const SettingSpec< bool > &  Setting 
)
virtual

Variant of the standard TieCheckBox which does the two step exchange between gui and stack variable and stack variable and shuttle.

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1816 of file ShuttleGui.cpp.

1819 {
1820  wxCheckBox * pCheck=NULL;
1821 
1822  auto Value = Setting.GetDefault();
1823  WrappedType WrappedRef( Value );
1824  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1825  if( DoStep(2) ) pCheck = DoTieCheckBox( Prompt, WrappedRef );
1826  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1827 
1828  return pCheck;
1829 }

References DoDataShuttle(), DoStep(), DoTieCheckBox(), SettingSpec< T >::GetDefault(), and SettingSpec< T >::GetPath().

Here is the call graph for this function:

◆ TieCheckBoxOnRight() [1/2]

wxCheckBox * ShuttleGuiBase::TieCheckBoxOnRight ( const TranslatableString Prompt,
bool &  Var 
)

Definition at line 1610 of file ShuttleGui.cpp.

1611 {
1612  // Only does anything different if it's creating.
1613  WrappedType WrappedRef( Var );
1614  if( mShuttleMode == eIsCreating )
1615  return AddCheckBoxOnRight( Prompt, WrappedRef.ReadAsString() == wxT("true") );
1616  return DoTieCheckBox( Prompt, WrappedRef );
1617 }

References AddCheckBoxOnRight(), DoTieCheckBox(), eIsCreating, mShuttleMode, and WrappedType::ReadAsString().

Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieCheckBoxOnRight().

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

◆ TieCheckBoxOnRight() [2/2]

wxCheckBox * ShuttleGuiBase::TieCheckBoxOnRight ( const TranslatableString Prompt,
const SettingSpec< bool > &  Setting 
)
virtual

Variant of the standard TieCheckBox which does the two step exchange between gui and stack variable and stack variable and shuttle.

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1833 of file ShuttleGui.cpp.

1836 {
1837  wxCheckBox * pCheck=NULL;
1838 
1839  auto Value = Setting.GetDefault();
1840  WrappedType WrappedRef( Value );
1841  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1842  if( DoStep(2) ) pCheck = DoTieCheckBoxOnRight( Prompt, WrappedRef );
1843  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1844 
1845  return pCheck;
1846 }

References DoDataShuttle(), DoStep(), DoTieCheckBoxOnRight(), SettingSpec< T >::GetDefault(), and SettingSpec< T >::GetPath().

Here is the call graph for this function:

◆ TieChoice() [1/3]

wxChoice * ShuttleGuiBase::TieChoice ( const TranslatableString Prompt,
const ChoiceSetting choiceSetting 
)
virtual

Variant of the standard TieChoice which does the two step exchange between gui and stack variable and stack variable and shuttle.

Parameters
PromptThe prompt shown beside the control.
SettingEncapsulates setting name, internal and visible choice strings, and a designation of one of those as default.

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1945 of file ShuttleGui.cpp.

1948 {
1949  // Do this to force any needed migrations first
1950  choiceSetting.Read();
1951 
1952  const auto &symbols = choiceSetting.GetSymbols();
1953  const auto &SettingName = choiceSetting.Key();
1954  const auto &Default = choiceSetting.Default().Internal();
1955  const auto &Choices = symbols.GetMsgids();
1956  const auto &InternalChoices = symbols.GetInternals();
1957 
1958  wxChoice * pChoice=(wxChoice*)NULL;
1959 
1960  int TempIndex=0;
1961 // int TempIndex = TranslateToIndex( Default, InternalChoices );
1962  wxString TempStr = Default;
1963  WrappedType WrappedRef( TempStr );
1964  // Get from prefs does 1 and 2.
1965  // Put to prefs does 2 and 3.
1966  if( DoStep(1) ) DoDataShuttle( SettingName, WrappedRef ); // Get Index from Prefs.
1967  if( DoStep(1) ) TempIndex = TranslateToIndex( TempStr, InternalChoices ); // To an index
1968  if( DoStep(2) ) pChoice = TieChoice( Prompt, TempIndex, Choices );
1969  if( DoStep(3) ) TempStr = TranslateFromIndex( TempIndex, InternalChoices ); // To a string
1970  if( DoStep(3) ) DoDataShuttle( SettingName, WrappedRef ); // Put into Prefs.
1971  return pChoice;
1972 }

References ChoiceSetting::Default(), DoDataShuttle(), DoStep(), ChoiceSetting::GetSymbols(), ComponentInterfaceSymbol::Internal(), ChoiceSetting::Key(), ChoiceSetting::Read(), TieChoice(), TranslateFromIndex(), and TranslateToIndex().

Here is the call graph for this function:

◆ TieChoice() [2/3]

wxChoice * ShuttleGuiBase::TieChoice ( const TranslatableString Prompt,
int &  Selected,
const TranslatableStrings choices 
)

Definition at line 1463 of file ShuttleGui.cpp.

1467 {
1468  HandleOptionality( Prompt );
1469 
1470  // The Add function does a UseUpId(), so don't do it here in that case.
1471  if( mShuttleMode != eIsCreating )
1472  UseUpId();
1473 
1474  wxChoice * pChoice=NULL;
1475  switch( mShuttleMode )
1476  {
1477  case eIsCreating:
1478  {
1479  pChoice = AddChoice( Prompt, choices, Selected );
1480  ShuttleGui::SetMinSize(pChoice, choices);
1481  }
1482  break;
1483  // IF setting internal storage from the controls.
1484  case eIsGettingMetadata:
1485  break;
1486  case eIsGettingFromDialog:
1487  {
1488  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1489  pChoice = wxDynamicCast(pWnd, wxChoice);
1490  wxASSERT( pChoice );
1491  Selected = pChoice->GetSelection();
1492  }
1493  break;
1494  case eIsSettingToDialog:
1495  {
1496  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1497  pChoice = wxDynamicCast(pWnd, wxChoice);
1498  wxASSERT( pChoice );
1499  pChoice->SetSelection( Selected );
1500  }
1501  break;
1502  default:
1503  wxASSERT( false );
1504  break;
1505  }
1506  return pChoice;
1507 }

References AddChoice(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, ShuttleGui::SetMinSize(), and UseUpId().

Here is the call graph for this function:

◆ TieChoice() [3/3]

wxChoice * ShuttleGuiBase::TieChoice ( const TranslatableString Prompt,
TranslatableString Selected,
const TranslatableStrings choices 
)

Definition at line 1701 of file ShuttleGui.cpp.

1705 {
1706  int Index = make_iterator_range( choices ).index( Selected );
1707  auto result = TieChoice( Prompt, Index, choices );
1708  if ( Index >= 0 && Index < choices.size() )
1709  Selected = choices[ Index ];
1710  else
1711  Selected = {};
1712  return result;
1713 }

References make_iterator_range().

Referenced by AudioUnitEffectOptionsDialog::PopulateOrExchange(), ExportFFmpegOPUSOptions::PopulateOrExchange(), ExportFLACOptions::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), DragCommand::PopulateOrExchange(), GetInfoCommand::PopulateOrExchange(), GetTrackInfoCommand::PopulateOrExchange(), HelpCommand::PopulateOrExchange(), ScreenshotCommand::PopulateOrExchange(), SelectTimeCommand::PopulateOrExchange(), SelectTracksCommand::PopulateOrExchange(), SetClipCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), EffectsPrefs::PopulateOrExchange(), GUIPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), TracksBehaviorsPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), WaveformPrefs::PopulateOrExchange(), TieChoice(), anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieChoice(), and TieNumberAsChoice().

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

◆ TieIntegerTextBox()

wxTextCtrl * ShuttleGuiBase::TieIntegerTextBox ( const TranslatableString Prompt,
const SettingSpec< int > &  Setting,
const int  nChars 
)
virtual

Variant of the standard TieTextBox which does the two step exchange between gui and stack variable and stack variable and shuttle. This one does it for double values...

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1906 of file ShuttleGui.cpp.

1910 {
1911  wxTextCtrl * pText=(wxTextCtrl*)NULL;
1912 
1913  auto Value = Setting.GetDefault();
1914  WrappedType WrappedRef( Value );
1915  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1916  if( DoStep(2) ) pText = DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1917  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1918  return pText;
1919 }

References DoDataShuttle(), DoStep(), DoTieNumericTextBox(), SettingSpec< T >::GetDefault(), and SettingSpec< T >::GetPath().

Referenced by EffectsPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieIntegerTextBox().

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

◆ TieNumberAsChoice()

wxChoice * ShuttleGuiBase::TieNumberAsChoice ( const TranslatableString Prompt,
const SettingSpec< int > &  Setting,
const TranslatableStrings Choices,
const std::vector< int > *  pInternalChoices = nullptr,
int  iNoMatchSelector = 0 
)
virtual

Variant of the standard TieChoice which does the two step exchange between gui and stack variable and stack variable and shuttle. The Translated choices and default are integers, not Strings. Behaves identically to the previous, but is meant for use when the choices are non-exhaustive and there is a companion control for arbitrary entry.

Parameters
PromptThe prompt shown beside the control.
SettingNameThe setting name as stored in gPrefs
DefaultThe default integer value for this control
ChoicesAn array of choices that appear on screen.
pInternalChoicesThe corresponding values (as an integer array) if null, then use 0, 1, 2, ...

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1985 of file ShuttleGui.cpp.

1991 {
1992  auto fn = [](int arg){ return wxString::Format( "%d", arg ); };
1993 
1994  wxArrayStringEx InternalChoices;
1995  if ( pInternalChoices )
1996  InternalChoices =
1997  transform_container<wxArrayStringEx>(*pInternalChoices, fn);
1998  else
1999  for ( int ii = 0; ii < (int)Choices.size(); ++ii )
2000  InternalChoices.push_back( fn( ii ) );
2001 
2002 
2003  const auto Default = Setting.GetDefault();
2004 
2005  miNoMatchSelector = iNoMatchSelector;
2006 
2007  long defaultIndex;
2008  if ( pInternalChoices )
2009  defaultIndex = make_iterator_range( *pInternalChoices ).index( Default );
2010  else
2011  defaultIndex = Default;
2012  if ( defaultIndex < 0 || defaultIndex >= (int)Choices.size() )
2013  defaultIndex = -1;
2014 
2015  ChoiceSetting choiceSetting{
2016  Setting.GetPath(),
2017  {
2018  ByColumns,
2019  Choices,
2020  InternalChoices,
2021  },
2022  defaultIndex
2023  };
2024 
2025  return ShuttleGuiBase::TieChoice( Prompt, choiceSetting );
2026 }

References ByColumns, fn, SettingSpec< T >::GetDefault(), SettingSpec< T >::GetPath(), make_iterator_range(), miNoMatchSelector, and TieChoice().

Referenced by ExportFFmpegAC3Options::PopulateOrExchange(), ExportFFmpegAMRNBOptions::PopulateOrExchange(), ExportFFmpegWMAOptions::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieNumberAsChoice().

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

◆ TieNumericTextBox() [1/3]

wxTextCtrl * ShuttleGuiBase::TieNumericTextBox ( const TranslatableString Prompt,
const SettingSpec< double > &  Setting,
const int  nChars 
)
virtual

Variant of the standard TieTextBox which does the two step exchange between gui and stack variable and stack variable and shuttle. This one does it for double values...

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1924 of file ShuttleGui.cpp.

1928 {
1929  wxTextCtrl * pText=(wxTextCtrl*)NULL;
1930 
1931  auto Value = Setting.GetDefault();
1932  WrappedType WrappedRef( Value );
1933  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1934  if( DoStep(2) ) pText = DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1935  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1936  return pText;
1937 }

References DoDataShuttle(), DoStep(), DoTieNumericTextBox(), SettingSpec< T >::GetDefault(), and SettingSpec< T >::GetPath().

Here is the call graph for this function:

◆ TieNumericTextBox() [2/3]

wxTextCtrl * ShuttleGuiBase::TieNumericTextBox ( const TranslatableString Prompt,
double &  Value,
const int  nChars = 0 
)

Definition at line 1654 of file ShuttleGui.cpp.

1656 {
1657  WrappedType WrappedRef( Value );
1658  return DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1659 }

References DoTieNumericTextBox().

Here is the call graph for this function:

◆ TieNumericTextBox() [3/3]

wxTextCtrl * ShuttleGuiBase::TieNumericTextBox ( const TranslatableString Prompt,
int &  Value,
const int  nChars = 0 
)

Definition at line 1647 of file ShuttleGui.cpp.

1649 {
1650  WrappedType WrappedRef( Value );
1651  return DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1652 }

References DoTieNumericTextBox().

Referenced by LV2EffectSettingsDialog::PopulateOrExchange(), DragCommand::PopulateOrExchange(), SetClipCommand::PopulateOrExchange(), SetEnvelopeCommand::PopulateOrExchange(), SetLabelCommand::PopulateOrExchange(), SetProjectCommand::PopulateOrExchange(), SetTrackBase::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieNumericTextBox().

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

◆ TieRadioButton()

wxRadioButton * ShuttleGuiBase::TieRadioButton ( )

This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair.

Definition at line 1510 of file ShuttleGui.cpp.

1511 {
1512  wxASSERT( mRadioCount >= 0); // Did you remember to use StartRadioButtonGroup() ?
1513 
1514  EnumValueSymbol symbol;
1515  if (mRadioCount >= 0 && mRadioCount < (int)mRadioSymbols.size() )
1516  symbol = mRadioSymbols[ mRadioCount ];
1517 
1518  // In what follows, WrappedRef is used in read only mode, but we
1519  // don't have a 'read-only' version, so we copy to deal with the constness.
1520  auto Temp = symbol.Internal();
1521  wxASSERT( !Temp.empty() ); // More buttons than values?
1522 
1523  WrappedType WrappedRef( Temp );
1524 
1525  mRadioCount++;
1526 
1527  UseUpId();
1528  wxRadioButton * pRadioButton = NULL;
1529 
1530  switch( mShuttleMode )
1531  {
1532  case eIsCreating:
1533  {
1534  const auto &Prompt = symbol.Translation();
1535 
1536  mpWind = pRadioButton = safenew wxRadioButton(GetParent(), miId, Prompt,
1537  wxDefaultPosition, wxDefaultSize,
1538  (mRadioCount==1)?wxRB_GROUP:0);
1539 
1540  wxASSERT( WrappedRef.IsString() );
1541  wxASSERT( mRadioValue->IsString() );
1542  const bool value =
1543  (WrappedRef.ReadAsString() == mRadioValue->ReadAsString() );
1544  pRadioButton->SetValue( value );
1545 
1546  pRadioButton->SetName(wxStripMenuCodes(Prompt));
1547  UpdateSizers();
1548  }
1549  break;
1550  case eIsGettingMetadata:
1551  break;
1552  case eIsGettingFromDialog:
1553  {
1554  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1555  pRadioButton = wxDynamicCast(pWnd, wxRadioButton);
1556  wxASSERT( pRadioButton );
1557  if( pRadioButton->GetValue() )
1558  mRadioValue->WriteToAsString( WrappedRef.ReadAsString() );
1559  }
1560  break;
1561  default:
1562  wxASSERT( false );
1563  break;
1564  }
1565  return pRadioButton;
1566 }

References eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, GetParent(), ComponentInterfaceSymbol::Internal(), WrappedType::IsString(), miId, mpDlg, mpWind, mRadioCount, mRadioSymbols, mRadioValue, mShuttleMode, WrappedType::ReadAsString(), safenew, ComponentInterfaceSymbol::Translation(), UpdateSizers(), UseUpId(), and WrappedType::WriteToAsString().

Referenced by ExportMP3Options::PopulateOrExchange(), ExportMultipleDialog::PopulateOrExchange(), and ImportExportPrefs::PopulateOrExchange().

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

◆ TieSlider() [1/4]

wxSlider * ShuttleGuiBase::TieSlider ( const TranslatableString Prompt,
const SettingSpec< int > &  Setting,
const int  max,
const int  min = 0 
)
virtual

Variant of the standard TieSlider which does the two step exchange between gui and stack variable and stack variable and shuttle.

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1850 of file ShuttleGui.cpp.

1855 {
1856  wxSlider * pSlider=NULL;
1857 
1858  auto Value = Setting.GetDefault();
1859  WrappedType WrappedRef( Value );
1860  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1861  if( DoStep(2) ) pSlider = DoTieSlider( Prompt, WrappedRef, max, min );
1862  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1863 
1864  return pSlider;
1865 }

References DoDataShuttle(), DoStep(), DoTieSlider(), SettingSpec< T >::GetDefault(), SettingSpec< T >::GetPath(), and min().

Here is the call graph for this function:

◆ TieSlider() [2/4]

wxSlider * ShuttleGuiBase::TieSlider ( const TranslatableString Prompt,
double &  pos,
const double  max,
const double  min = 0.0 
)

Definition at line 1668 of file ShuttleGui.cpp.

1671 {
1672  WrappedType WrappedRef( pos );
1673  return DoTieSlider( Prompt, WrappedRef, max, min );
1674 }

References DoTieSlider(), and min().

Here is the call graph for this function:

◆ TieSlider() [3/4]

wxSlider * ShuttleGuiBase::TieSlider ( const TranslatableString Prompt,
float &  pos,
const float  fMin,
const float  fMax 
)

Definition at line 1676 of file ShuttleGui.cpp.

1679 {
1680  const float RoundFix=0.0000001f;
1681  int iVal=(pos-fMin+RoundFix)*100.0/(fMax-fMin);
1682  wxSlider * pWnd = TieSlider( Prompt, iVal, 100 );
1683  pos = iVal*(fMax-fMin)*0.01+fMin;
1684  return pWnd;
1685 }

References TieSlider().

Here is the call graph for this function:

◆ TieSlider() [4/4]

wxSlider * ShuttleGuiBase::TieSlider ( const TranslatableString Prompt,
int &  pos,
const int  max,
const int  min = 0 
)

Definition at line 1661 of file ShuttleGui.cpp.

1663 {
1664  WrappedType WrappedRef( pos );
1665  return DoTieSlider( Prompt, WrappedRef, max, min );
1666 }

References DoTieSlider(), and min().

Referenced by ExportFFmpegAACOptions::PopulateOrExchange(), ExportOGGOptions::PopulateOrExchange(), SoundActivatedRecordDialog::PopulateOrExchange(), SetTrackAudioCommand::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSlider(), TieSlider(), and TieVSlider().

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

◆ TieSpinCtrl() [1/2]

wxSpinCtrl * ShuttleGuiBase::TieSpinCtrl ( const TranslatableString Prompt,
const SettingSpec< int > &  Setting,
const int  max,
const int  min 
)
virtual

Variant of the standard TieSpinCtrl which does the two step exchange between gui and stack variable and stack variable and shuttle.

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1869 of file ShuttleGui.cpp.

1874 {
1875  wxSpinCtrl * pSpinCtrl=NULL;
1876 
1877  auto Value = Setting.GetDefault();
1878  WrappedType WrappedRef( Value );
1879  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1880  if( DoStep(2) ) pSpinCtrl = DoTieSpinCtrl( Prompt, WrappedRef, max, min );
1881  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1882 
1883  return pSpinCtrl;
1884 }

References DoDataShuttle(), DoStep(), DoTieSpinCtrl(), SettingSpec< T >::GetDefault(), SettingSpec< T >::GetPath(), and min().

Here is the call graph for this function:

◆ TieSpinCtrl() [2/2]

wxSpinCtrl * ShuttleGuiBase::TieSpinCtrl ( const TranslatableString Prompt,
int &  Value,
const int  max,
const int  min = 0 
)

Definition at line 1619 of file ShuttleGui.cpp.

1621 {
1622  WrappedType WrappedRef(Value);
1623  return DoTieSpinCtrl( Prompt, WrappedRef, max, min );
1624 }

References DoTieSpinCtrl(), and min().

Referenced by ExportFFmpegOptions::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSpinCtrl().

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

◆ TieTextBox() [1/4]

wxTextCtrl * ShuttleGuiBase::TieTextBox ( const TranslatableString Caption,
wxString &  Value,
const int  nChars = 0 
)

Definition at line 1626 of file ShuttleGui.cpp.

1628 {
1629  WrappedType WrappedRef(Selected);
1630  return DoTieTextBox( Prompt, WrappedRef, nChars );
1631 }

References DoTieTextBox().

Referenced by ExportFFmpegOptions::PopulateOrExchange(), CompareAudioCommand::PopulateOrExchange(), DemoCommand::PopulateOrExchange(), DragCommand::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(), SetLabelCommand::PopulateOrExchange(), SetProjectCommand::PopulateOrExchange(), SetTrackStatusCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), SetTrackNameCommand::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieTextBox().

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

◆ TieTextBox() [2/4]

wxTextCtrl * ShuttleGuiBase::TieTextBox ( const TranslatableString Prompt,
const SettingSpec< wxString > &  Setting,
const int  nChars 
)
virtual

Variant of the standard TieTextBox which does the two step exchange between gui and stack variable and stack variable and shuttle.

Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.

Definition at line 1888 of file ShuttleGui.cpp.

1892 {
1893  wxTextCtrl * pText=(wxTextCtrl*)NULL;
1894 
1895  auto Value = Setting.GetDefault();
1896  WrappedType WrappedRef( Value );
1897  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1898  if( DoStep(2) ) pText = DoTieTextBox( Prompt, WrappedRef, nChars );
1899  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1900  return pText;
1901 }

References DoDataShuttle(), DoStep(), DoTieTextBox(), SettingSpec< T >::GetDefault(), and SettingSpec< T >::GetPath().

Here is the call graph for this function:

◆ TieTextBox() [3/4]

wxTextCtrl * ShuttleGuiBase::TieTextBox ( const TranslatableString Prompt,
double &  Value,
const int  nChars = 0 
)

Definition at line 1640 of file ShuttleGui.cpp.

1642 {
1643  WrappedType WrappedRef( Value );
1644  return DoTieTextBox( Prompt, WrappedRef, nChars );
1645 }

References DoTieTextBox().

Here is the call graph for this function:

◆ TieTextBox() [4/4]

wxTextCtrl * ShuttleGuiBase::TieTextBox ( const TranslatableString Prompt,
int &  Selected,
const int  nChars = 0 
)

Definition at line 1633 of file ShuttleGui.cpp.

1635 {
1636  WrappedType WrappedRef( Selected );
1637  return DoTieTextBox( Prompt, WrappedRef, nChars );
1638 }

References DoTieTextBox().

Here is the call graph for this function:

◆ TieVSlider()

wxSlider * ShuttleGuiBase::TieVSlider ( const TranslatableString Prompt,
float &  pos,
const float  fMin,
const float  fMax 
)

Definition at line 1687 of file ShuttleGui.cpp.

1690 {
1691  int iVal=(pos-fMin)*100.0/(fMax-fMin);
1692 // if( mShuttleMode == eIsCreating )
1693 // {
1694 // return AddVSlider( Prompt, iVal, 100 );
1695 // }
1696  wxSlider * pWnd = TieSlider( Prompt, iVal, 100 );
1697  pos = iVal*(fMax-fMin)*0.01+fMin;
1698  return pWnd;
1699 }

References TieSlider().

Here is the call graph for this function:

◆ TranslateFromIndex()

wxString ShuttleGuiBase::TranslateFromIndex ( const int  nIn,
const wxArrayStringEx Choices 
)

Index-to-String.

Definition at line 1733 of file ShuttleGui.cpp.

1734 {
1735  int n = nIn;
1736  if( n== wxNOT_FOUND )
1738  miNoMatchSelector = 0;
1739  if( n < (int)Choices.size() )
1740  {
1741  return Choices[n];
1742  }
1743  return wxT("");
1744 }

References miNoMatchSelector.

Referenced by TieChoice().

Here is the caller graph for this function:

◆ TranslateToIndex()

int ShuttleGuiBase::TranslateToIndex ( const wxString &  Value,
const wxArrayStringEx Choices 
)

String-to-Index.

Definition at line 1723 of file ShuttleGui.cpp.

1724 {
1725  int n = make_iterator_range( Choices ).index( Value );
1726  if( n == wxNOT_FOUND )
1728  miNoMatchSelector = 0;
1729  return n;
1730 }

References make_iterator_range(), and miNoMatchSelector.

Referenced by TieChoice().

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

◆ UpdateSizers()

void ShuttleGuiBase::UpdateSizers ( )
protected

Definition at line 2161 of file ShuttleGui.cpp.

2162 { UpdateSizersCore( false, wxEXPAND | wxALL );}

References UpdateSizersCore().

Referenced by AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), ShuttleGui::AddStandardButtons(), AddTextBox(), AddTextWindow(), AddTitle(), AddTree(), AddVariableText(), DoAddRadioButton(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), StartVerticalLay(), and TieRadioButton().

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

◆ UpdateSizersAtStart()

void ShuttleGuiBase::UpdateSizersAtStart ( )
protected

Definition at line 2170 of file ShuttleGui.cpp.

2171 { UpdateSizersCore( true, wxEXPAND | wxALL );}

References UpdateSizersCore().

Referenced by StartScroller().

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

◆ UpdateSizersC()

void ShuttleGuiBase::UpdateSizersC ( )
protected

Definition at line 2165 of file ShuttleGui.cpp.

2166 { UpdateSizersCore( false, wxALIGN_CENTRE | wxALL );}

References UpdateSizersCore().

Referenced by AddFixedText(), AddIcon(), and AddVariableText().

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

◆ UpdateSizersCore()

void ShuttleGuiBase::UpdateSizersCore ( bool  bPrepend,
int  Flags,
bool  prompt = false 
)
protected

Definition at line 2107 of file ShuttleGui.cpp.

2108 {
2109  if( mpWind && mpParent )
2110  {
2111  int useFlags = Flags;
2112 
2113  if ( !prompt && mItem.mWindowPositionFlags )
2114  // override the given Flags
2115  useFlags = mItem.mWindowPositionFlags;
2116 
2117  if (!prompt)
2118  ApplyItem( 0, mItem, mpWind, mpDlg );
2119 
2120  if( mpSizer){
2121  if( bPrepend )
2122  {
2123  mpSizer->Prepend(mpWind, miProp, useFlags, miBorder);
2124  }
2125  else
2126  {
2127  mpSizer->Add(mpWind, miProp, useFlags, miBorder);
2128  }
2129  }
2130 
2131  if (!prompt) {
2132  ApplyItem( 1, mItem, mpWind, mpDlg );
2133  // Reset to defaults
2134  mItem = {};
2135  }
2136  }
2137 
2138  if( mpSubSizer && mpSizer )
2139  {
2140  // When adding sizers into sizers, don't add a border.
2141  // unless it's a static box sizer.
2142  wxSizer *const pSubSizer = mpSubSizer.get();
2143  if (wxDynamicCast(pSubSizer, wxStaticBoxSizer))
2144  {
2145  mpSizer->Add( mpSubSizer.release(), miSizerProp, Flags , miBorder);
2146  }
2147  else
2148  {
2149  mpSizer->Add( mpSubSizer.release(), miSizerProp, Flags ,0);//miBorder);
2150  }
2151  mpSizer = pSubSizer;
2152  PushSizer();
2153  }
2154 
2155  mpWind = NULL;
2156  miProp = 0;
2157  miSizerProp =0;
2158 }

References ApplyItem(), miBorder, miProp, miSizerProp, mItem, mpDlg, mpParent, mpSizer, mpSubSizer, mpWind, DialogDefinition::Item::mWindowPositionFlags, and PushSizer().

Referenced by AddBitmapButton(), AddButton(), AddPrompt(), AddUnits(), AddVariableText(), AddWindow(), StartHorizontalLay(), StartMultiColumn(), StartVerticalLay(), UpdateSizers(), UpdateSizersAtStart(), and UpdateSizersC().

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

◆ UseUpId()

void ShuttleGuiBase::UseUpId ( )

The Ids increment as we add NEW controls. However, the user can force the id manually, for example if they need a specific Id for a button, and then let it resume normal numbering later. UseUpId() sets miId to the next Id, either using the user specicfied one, or resuming the sequence.

Definition at line 2038 of file ShuttleGui.cpp.

2039 {
2040  if( miIdSetByUser > 0)
2041  {
2042  miId = miIdSetByUser;
2043  miIdSetByUser = -1;
2044  return;
2045  }
2046  miId = miIdNext++;
2047 }

References miId, miIdNext, and miIdSetByUser.

Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTree(), AddVariableText(), DoAddRadioButton(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinCtrl(), DoTieTextBox(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), TieChoice(), and TieRadioButton().

Here is the caller graph for this function:

Member Data Documentation

◆ miBorder

int ShuttleGuiBase::miBorder
protected

Definition at line 548 of file ShuttleGui.h.

Referenced by Init(), StartInvisiblePanel(), StartPanel(), and UpdateSizersCore().

◆ miId

int ShuttleGuiBase::miId
protected

◆ miIdNext

int ShuttleGuiBase::miIdNext
protected

Definition at line 553 of file ShuttleGui.h.

Referenced by ResetId(), and UseUpId().

◆ miIdSetByUser

int ShuttleGuiBase::miIdSetByUser
protected

Definition at line 554 of file ShuttleGui.h.

Referenced by ShuttleGui::Id(), ResetId(), and UseUpId().

◆ miNoMatchSelector

int ShuttleGuiBase::miNoMatchSelector
protected

Controls source/destination of shuttled data. You can leave this NULL if you are shuttling to variables

Definition at line 542 of file ShuttleGui.h.

Referenced by Init(), TieNumberAsChoice(), TranslateFromIndex(), and TranslateToIndex().

◆ miProp

int ShuttleGuiBase::miProp
protected

◆ miPropSetByUser

int ShuttleGuiBase::miPropSetByUser
protected

Definition at line 556 of file ShuttleGui.h.

Referenced by Init(), Prop(), and SetProportions().

◆ miSizerProp

int ShuttleGuiBase::miSizerProp
protected

◆ mItem

DialogDefinition::Item ShuttleGuiBase::mItem
protected

Definition at line 589 of file ShuttleGui.h.

Referenced by AddReadOnlyText(), AddSlider(), GetStyle(), and UpdateSizersCore().

◆ mpbOptionalFlag

bool* ShuttleGuiBase::mpbOptionalFlag
protected

Definition at line 558 of file ShuttleGui.h.

Referenced by AddCheckBox(), AddPrompt(), HandleOptionality(), and ShuttleGui::Optional().

◆ mpDlg

wxWindow* const ShuttleGuiBase::mpDlg
protected

◆ mpParent

wxWindow* ShuttleGuiBase::mpParent
protected

◆ mpShuttle

std::unique_ptr<Shuttle> ShuttleGuiBase::mpShuttle
protected

Definition at line 540 of file ShuttleGui.h.

Referenced by DoDataShuttle(), Init(), and ShuttleGui::ShuttleGui().

◆ mpSizer

wxSizer* ShuttleGuiBase::mpSizer
protected

◆ mpSubSizer

std::unique_ptr<wxSizer> ShuttleGuiBase::mpSubSizer
protected

◆ mpWind

wxWindow* ShuttleGuiBase::mpWind
protected

◆ mRadioCount

int ShuttleGuiBase::mRadioCount
private

The wrapped value associated with the active radio button.

Definition at line 583 of file ShuttleGui.h.

Referenced by EndRadioButtonGroup(), Init(), StartRadioButtonGroup(), and TieRadioButton().

◆ mRadioSettingName

wxString ShuttleGuiBase::mRadioSettingName
private

Definition at line 581 of file ShuttleGui.h.

Referenced by EndRadioButtonGroup(), Init(), and StartRadioButtonGroup().

◆ mRadioSymbols

std::vector<EnumValueSymbol> ShuttleGuiBase::mRadioSymbols
private

Definition at line 580 of file ShuttleGui.h.

Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), and TieRadioButton().

◆ mRadioValue

Optional<WrappedType> ShuttleGuiBase::mRadioValue
private

The setting controlled by a group.

Definition at line 582 of file ShuttleGui.h.

Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), and TieRadioButton().

◆ mRadioValueString

wxString ShuttleGuiBase::mRadioValueString
private

The index of this radio item. -1 for none.

Definition at line 584 of file ShuttleGui.h.

Referenced by StartRadioButtonGroup().

◆ mShuttleMode

teShuttleMode ShuttleGuiBase::mShuttleMode
protected

◆ mSizerDepth

int ShuttleGuiBase::mSizerDepth
protected

Definition at line 547 of file ShuttleGui.h.

Referenced by Init(), PopSizer(), and PushSizer().

◆ pSizerStack

wxSizer* ShuttleGuiBase::pSizerStack[nMaxNestedSizers]
protected

Definition at line 538 of file ShuttleGui.h.

Referenced by PopSizer(), and PushSizer().


The documentation for this class was generated from the following files:
ReadOnlyText
Definition: ReadOnlyText.h:60
Optional::emplace
X & emplace(Args &&... args)
Definition: MemoryX.h:259
SettingSpec::GetDefault
const T & GetDefault() const
Definition: ShuttleGui.h:113
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:36
WrappedType::ReadAsString
wxString ReadAsString()
Definition: WrappedType.cpp:42
ShuttleGuiBase::Init
void Init(bool vertical, wxSize minSize)
Definition: ShuttleGui.cpp:141
TranslatableString::empty
bool empty() const
Definition: Types.h:329
ShuttleGuiBase::mRadioValue
Optional< WrappedType > mRadioValue
The setting controlled by a group.
Definition: ShuttleGui.h:582
ShuttleGuiBase::AddCheckBoxOnRight
wxCheckBox * AddCheckBoxOnRight(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:336
ShuttleGuiBase::AddChoice
wxChoice * AddChoice(const TranslatableString &Prompt, const TranslatableStrings &choices, int Selected=-1)
Definition: ShuttleGui.cpp:391
wxSliderWrapper
wxSlider wxSliderWrapper
Definition: ShuttleGui.h:103
ShuttleGuiBase::AddCheckBox
wxCheckBox * AddCheckBox(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:302
make_iterator_range
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
Definition: MemoryX.h:625
ShuttleGuiBase::DoTieSpinCtrl
wxSpinCtrl * DoTieSpinCtrl(const TranslatableString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
Definition: ShuttleGui.cpp:1305
ShuttleGui::SetMinSize
static void SetMinSize(wxWindow *window, const TranslatableStrings &items)
Definition: ShuttleGui.cpp:2432
ShuttleGuiBase::HandleOptionality
void HandleOptionality(const TranslatableString &Prompt)
Definition: ShuttleGui.cpp:217
eIsGettingFromDialog
@ eIsGettingFromDialog
Definition: ShuttleGui.h:37
ComponentInterfaceSymbol::Translation
const wxString Translation() const
Definition: ComponentInterface.h:91
fn
static const auto fn
Definition: WaveformView.cpp:1102
DialogDefinition::Item::mDisabled
bool mDisabled
Definition: ShuttleGui.h:247
wxNotebookPage
wxWindow wxNotebookPage
Definition: ShuttleGui.h:59
ShuttleGuiBase::UpdateSizersAtStart
void UpdateSizersAtStart()
Definition: ShuttleGui.cpp:2170
ChoiceSetting::Key
const wxString & Key() const
Definition: Prefs.h:106
wxPanelWrapper
Definition: wxPanelWrapper.h:41
ShuttleGuiBase::miIdSetByUser
int miIdSetByUser
Definition: ShuttleGui.h:554
SettingSpec::GetPath
const RegistryPath & GetPath() const
Definition: ShuttleGui.h:112
ShuttleGuiBase::DoTieCheckBoxOnRight
wxCheckBox * DoTieCheckBoxOnRight(const TranslatableString &Prompt, WrappedType &WrappedRef)
Definition: ShuttleGui.cpp:1269
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1603
ShuttleGuiBase::ApplyItem
static void ApplyItem(int step, const DialogDefinition::Item &item, wxWindow *pWind, wxWindow *pDlg)
Definition: ShuttleGui.cpp:2061
WrappedType::IsString
bool IsString()
Definition: WrappedType.cpp:35
ShuttleGuiBase::mpShuttle
std::unique_ptr< Shuttle > mpShuttle
Definition: ShuttleGui.h:540
WrappedType::WriteToAsBool
void WriteToAsBool(const bool InBool)
Definition: WrappedType.cpp:233
ShuttleGuiBase::TieSlider
wxSlider * TieSlider(const TranslatableString &Prompt, int &pos, const int max, const int min=0)
Definition: ShuttleGui.cpp:1661
Validator
A Validator is an object which checks whether a wxVariant satisfies a certain criterion....
Definition: Validators.h:53
ShuttleGuiBase::TranslateToIndex
int TranslateToIndex(const wxString &Value, const wxArrayStringEx &Choices)
String-to-Index.
Definition: ShuttleGui.cpp:1723
ShuttleGuiBase::pSizerStack
wxSizer * pSizerStack[nMaxNestedSizers]
Definition: ShuttleGui.h:538
ShuttleGuiBase::mRadioValueString
wxString mRadioValueString
The index of this radio item. -1 for none.
Definition: ShuttleGui.h:584
WrappedType::ReadAsBool
bool ReadAsBool()
Definition: WrappedType.cpp:124
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1212
WrappedType::ReadAsInt
int ReadAsInt()
Definition: WrappedType.cpp:68
ShuttleGuiBase::DoTieTextBox
wxTextCtrl * DoTieTextBox(const TranslatableString &Prompt, WrappedType &WrappedRef, const int nChars)
Definition: ShuttleGui.cpp:1344
ShuttleGuiBase::DoInsertListColumns
void DoInsertListColumns(wxListCtrl *pListCtrl, long listControlStyles, std::initializer_list< const ListControlColumn > columns)
Definition: ShuttleGui.cpp:816
ShuttleGuiBase::mRadioSettingName
wxString mRadioSettingName
Definition: ShuttleGui.h:581
DialogDefinition::Item::mToolTip
TranslatableString mToolTip
Definition: ShuttleGui.h:229
ShuttleGuiBase::miSizerProp
int miSizerProp
Definition: ShuttleGui.h:546
eIsSettingToDialog
@ eIsSettingToDialog
Definition: ShuttleGui.h:38
wxArrayStringEx
Definition: MemoryX.h:663
ShuttleGuiBase::EndPanel
void EndPanel()
Definition: ShuttleGui.cpp:1011
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterface.h:60
Optional::reset
void reset()
Definition: MemoryX.h:287
ShuttleGuiBase::DoTieSlider
wxSlider * DoTieSlider(const TranslatableString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
Definition: ShuttleGui.cpp:1420
ShuttleGuiBase::DoStep
bool DoStep(int iStep)
Definition: ShuttleGui.cpp:1791
ShuttleGuiBase::miPropSetByUser
int miPropSetByUser
Definition: ShuttleGui.h:556
ShuttleGuiBase::AddSpinCtrl
wxSpinCtrl * AddSpinCtrl(const TranslatableString &Prompt, int Value, int Max, int Min)
Definition: ShuttleGui.cpp:609
ShuttleGuiBase::miBorder
int miBorder
Definition: ShuttleGui.h:548
ChoiceSetting
Definition: Prefs.h:90
DialogDefinition::Item::mWindowPositionFlags
int mWindowPositionFlags
Definition: ShuttleGui.h:238
DialogDefinition::Item::mName
TranslatableString mName
Definition: ShuttleGui.h:230
wxTextCtrlWrapper
Definition: wxTextCtrlWrapper.h:23
ShuttleGuiBase::AddNumericTextBox
wxTextCtrl * AddNumericTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:667
ShuttleGuiBase::mpSizer
wxSizer * mpSizer
Definition: ShuttleGui.h:561
DialogDefinition::Item::miStyle
long miStyle
Definition: ShuttleGui.h:235
ShuttleGuiBase::AddTextBox
wxTextCtrl * AddTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:631
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1203
WrappedType
Used in type conversions, this wrapper for ints, strings, doubles and enums provides conversions betw...
Definition: WrappedType.h:31
ShuttleGuiBase::miIdNext
int miIdNext
Definition: ShuttleGui.h:553
ShuttleGuiBase::ResetId
void ResetId()
Definition: ShuttleGui.cpp:186
ShuttleGuiBase::miProp
int miProp
Definition: ShuttleGui.h:549
ShuttleGuiBase::UpdateSizers
void UpdateSizers()
Definition: ShuttleGui.cpp:2161
ShuttleGuiBase::UpdateSizersC
void UpdateSizersC()
Definition: ShuttleGui.cpp:2165
ShuttleGuiBase::mpParent
wxWindow * mpParent
Definition: ShuttleGui.h:562
ShuttleGuiBase::PopSizer
void PopSizer()
Definition: ShuttleGui.cpp:2173
ShuttleGuiBase::PushSizer
void PushSizer()
Definition: ShuttleGui.cpp:2180
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:503
ShuttleGuiBase::mpbOptionalFlag
bool * mpbOptionalFlag
Definition: ShuttleGui.h:558
DialogDefinition::Item::mNameSuffix
TranslatableString mNameSuffix
Definition: ShuttleGui.h:231
WindowAccessible
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...
ShuttleGuiBase::TranslateFromIndex
wxString TranslateFromIndex(const int nIn, const wxArrayStringEx &Choices)
Index-to-String.
Definition: ShuttleGui.cpp:1733
ChoiceSetting::GetSymbols
const EnumValueSymbols & GetSymbols() const
Definition: Prefs.h:108
ShuttleGuiBase::AddSlider
wxSlider * AddSlider(const TranslatableString &Prompt, int pos, int Max, int Min=0)
Definition: ShuttleGui.cpp:582
ShuttleGuiBase::UpdateSizersCore
void UpdateSizersCore(bool bPrepend, int Flags, bool prompt=false)
Definition: ShuttleGui.cpp:2107
ChoiceSetting::Read
wxString Read() const
Definition: Prefs.cpp:235
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
ShuttleGuiBase::mRadioCount
int mRadioCount
The wrapped value associated with the active radio button.
Definition: ShuttleGui.h:583
eIsGettingMetadata
@ eIsGettingMetadata
Definition: ShuttleGui.h:39
ShuttleGuiBase::miId
int miId
Definition: ShuttleGui.h:552
ShuttleGuiBase::UseUpId
void UseUpId()
Definition: ShuttleGui.cpp:2038
ShuttleGuiBase::SetProportions
void SetProportions(int Default)
Definition: ShuttleGui.cpp:2049
ChoiceSetting::Default
const EnumValueSymbol & Default() const
Definition: Prefs.cpp:227
ShuttleGuiBase::mShuttleMode
teShuttleMode mShuttleMode
Used in choices to determine which item to use on no match.
Definition: ShuttleGui.h:544
ShuttleGuiBase::mpWind
wxWindow * mpWind
Definition: ShuttleGui.h:563
ShuttleGuiBase::DoTieNumericTextBox
wxTextCtrl * DoTieNumericTextBox(const TranslatableString &Prompt, WrappedType &WrappedRef, const int nChars)
Definition: ShuttleGui.cpp:1382
TranslatableString::StrippedTranslation
wxString StrippedTranslation() const
Definition: Types.h:460
DialogDefinition::Item::mUseBestSize
bool mUseBestSize
Definition: ShuttleGui.h:244
ShuttleGuiBase::miNoMatchSelector
int miNoMatchSelector
Definition: ShuttleGui.h:542
ComponentInterfaceSymbol::Internal
const wxString & Internal() const
Definition: ComponentInterface.h:88
ShuttleGuiBase::mSizerDepth
int mSizerDepth
Definition: ShuttleGui.h:547
ShuttleGuiBase::DoDataShuttle
void DoDataShuttle(const wxString &Name, WrappedType &WrappedRef)
Definition: ShuttleGui.cpp:1221
ShuttleGuiBase::GetStyle
long GetStyle(long Style)
Definition: ShuttleGui.cpp:2187
ShuttleGuiBase::mItem
DialogDefinition::Item mItem
Definition: ShuttleGui.h:589
WrappedType::WriteToAsString
void WriteToAsString(const wxString &InStr)
Definition: WrappedType.cpp:152
DialogDefinition::Item::mHasMinSize
bool mHasMinSize
Definition: ShuttleGui.h:243
ShuttleGuiBase::mRadioSymbols
std::vector< EnumValueSymbol > mRadioSymbols
Definition: ShuttleGui.h:580
wxStaticBoxWrapper
wxStaticBox wxStaticBoxWrapper
Definition: ShuttleGui.h:102
ShuttleGuiBase::AddPrompt
void AddPrompt(const TranslatableString &Prompt, int wrapWidth=0)
Right aligned text string.
Definition: ShuttleGui.cpp:231
TranslatableString::Translation
wxString Translation() const
Definition: Types.h:337
ByColumns
ByColumns_t ByColumns
Definition: Prefs.cpp:373
ShuttleGuiBase::DoTieCheckBox
wxCheckBox * DoTieCheckBox(const TranslatableString &Prompt, WrappedType &WrappedRef)
Definition: ShuttleGui.cpp:1233
DialogDefinition::Item::mRootConnections
std::vector< std::pair< wxEventType, wxObjectEventFunction > > mRootConnections
Definition: ShuttleGui.h:233
DialogDefinition::Item::mFocused
bool mFocused
Definition: ShuttleGui.h:246
TranslatableString::Stripped
TranslatableString Stripped(unsigned options=MenuCodes) const
Definition: Types.h:457
safenew
#define safenew
Definition: MemoryX.h:8
ShuttleGuiBase::mpDlg
wxWindow *const mpDlg
Definition: ShuttleGui.h:537
WrappedType::WriteToAsInt
void WriteToAsInt(const int InInt)
Definition: WrappedType.cpp:181
DialogDefinition::Item::mMinSize
wxSize mMinSize
Definition: ShuttleGui.h:242
ShuttleGuiBase::mpSubSizer
std::unique_ptr< wxSizer > mpSubSizer
Definition: ShuttleGui.h:560
ShuttleGuiBase::TieChoice
wxChoice * TieChoice(const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
Definition: ShuttleGui.cpp:1701
ShuttleGuiBase::DoAddRadioButton
wxRadioButton * DoAddRadioButton(const TranslatableString &Prompt, int style, int selector, int initValue)
Unwrapped string value.
Definition: ShuttleGui.cpp:541
DialogDefinition::Item::mWindowSize
wxSize mWindowSize
Definition: ShuttleGui.h:240
DialogDefinition::Item::mValidatorSetter
std::function< void(wxWindow *) > mValidatorSetter
Definition: ShuttleGui.h:228
nMaxNestedSizers
const int nMaxNestedSizers
Definition: ShuttleGui.h:32