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, int PositionFlags=wxALIGN_CENTRE)
 
wxSlider * AddSlider (const TranslatableString &Prompt, int pos, int Max, int Min=0)
 
wxSlider * AddVSlider (const TranslatableString &Prompt, int pos, int Max)
 
wxSpinCtrl * AddSpinCtrl (const TranslatableString &Prompt, int Value, int Max, int Min)
 
wxTreeCtrl * AddTree ()
 
wxRadioButton * AddRadioButton (const TranslatableString &Prompt, int selector=0, int initValue=0)
 
wxRadioButton * AddRadioButtonToGroup (const TranslatableString &Prompt, int selector=1, int initValue=0)
 
wxButton * AddButton (const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
 
wxBitmapButton * AddBitmapButton (const wxBitmap &Bitmap, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
 
wxStaticText * AddVariableText (const TranslatableString &Str, bool bCenter=false, int PositionFlags=0, int wrapWidth=0)
 
ReadOnlyTextAddReadOnlyText (const TranslatableString &Caption, const wxString &Value)
 
wxTextCtrl * AddTextBox (const TranslatableString &Caption, const wxString &Value, const int nChars)
 
wxTextCtrl * AddNumericTextBox (const TranslatableString &Caption, const wxString &Value, const int nChars)
 
wxTextCtrl * AddTextWindow (const wxString &Value)
 Multiline text box that grows. More...
 
wxListBox * AddListBox (const wxArrayStringEx &choices)
 
wxListCtrl * AddListControl (std::initializer_list< const ListControlColumn > columns={}, long listControlStyles=0)
 
wxListCtrl * AddListControlReportMode (std::initializer_list< const ListControlColumn > columns={}, long listControlStyles=0)
 
wxGrid * AddGrid ()
 
wxCheckBox * AddCheckBox (const TranslatableString &Prompt, bool Selected)
 
wxCheckBox * AddCheckBoxOnRight (const TranslatableString &Prompt, bool Selected)
 
wxCheckBox * AddCheckBox (const TranslatableString &Prompt, const wxChar *)=delete
 
wxCheckBox * AddCheckBox (const TranslatableString &Prompt, const char *)=delete
 
wxCheckBox * AddCheckBoxOnRight (const TranslatableString &Prompt, const wxChar *)=delete
 
wxCheckBox * AddCheckBoxOnRight (const TranslatableString &Prompt, const char *)=delete
 
wxComboBox * AddCombo (const TranslatableString &Prompt, const wxString &Selected, const wxArrayStringEx &choices)
 
wxChoice * AddChoice (const TranslatableString &Prompt, const TranslatableStrings &choices, int Selected=-1)
 
wxChoice * AddChoice (const TranslatableString &Prompt, const TranslatableStrings &choices, const TranslatableString &selected)
 
void AddIcon (wxBitmap *pBmp)
 
void AddFixedText (const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
 
void AddConstTextBox (const TranslatableString &Caption, const TranslatableString &Value)
 Single line text box of fixed size. More...
 
void StartHorizontalLay (int PositionFlags=wxALIGN_CENTRE, int iProp=1)
 
void EndHorizontalLay ()
 
void StartVerticalLay (int iProp=1)
 
void StartVerticalLay (int PositionFlags, int iProp)
 
void EndVerticalLay ()
 
void StartWrapLay (int PositionFlags=wxEXPAND, int iProp=0)
 
void EndWrapLay ()
 
wxScrolledWindow * StartScroller (int iStyle=0)
 
void EndScroller ()
 
wxPanel * StartPanel (int iStyle=0)
 
void EndPanel ()
 
void StartMultiColumn (int nCols, int PositionFlags=wxALIGN_LEFT)
 
void EndMultiColumn ()
 
void StartTwoColumn ()
 
void EndTwoColumn ()
 
void StartThreeColumn ()
 
void EndThreeColumn ()
 
wxStaticBox * StartStatic (const TranslatableString &Str, int iProp=0)
 
void EndStatic ()
 
wxNotebook * StartNotebook ()
 
void EndNotebook ()
 
wxSimplebook * StartSimplebook ()
 
void EndSimplebook ()
 
wxNotebookPageStartNotebookPage (const TranslatableString &Name)
 
void EndNotebookPage ()
 
wxPanel * StartInvisiblePanel ()
 
void EndInvisiblePanel ()
 
void StartRadioButtonGroup (const ChoiceSetting &Setting)
 Call this before any TieRadioButton calls. More...
 
void EndRadioButtonGroup ()
 
bool DoStep (int iStep)
 
int TranslateToIndex (const wxString &Value, const wxArrayStringEx &Choices)
 String-to-Index. More...
 
wxString TranslateFromIndex (const int nIn, const wxArrayStringEx &Choices)
 Index-to-String. More...
 
wxTextCtrl * TieTextBox (const TranslatableString &Caption, wxString &Value, const int nChars=0)
 
wxTextCtrl * TieTextBox (const TranslatableString &Prompt, int &Selected, const int nChars=0)
 
wxTextCtrl * TieTextBox (const TranslatableString &Prompt, double &Value, const int nChars=0)
 
wxTextCtrl * TieNumericTextBox (const TranslatableString &Prompt, int &Value, const int nChars=0)
 
wxTextCtrl * TieNumericTextBox (const TranslatableString &Prompt, double &Value, const int nChars=0)
 
wxCheckBox * TieCheckBox (const TranslatableString &Prompt, bool &Var)
 
wxCheckBox * TieCheckBoxOnRight (const TranslatableString &Prompt, bool &Var)
 
wxChoice * TieChoice (const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
 
wxChoice * TieChoice (const TranslatableString &Prompt, int &Selected, const TranslatableStrings &choices)
 
wxSlider * TieSlider (const TranslatableString &Prompt, int &pos, const int max, const int min=0)
 
wxSlider * TieSlider (const TranslatableString &Prompt, double &pos, const double max, const double min=0.0)
 
wxSlider * TieSlider (const TranslatableString &Prompt, float &pos, const float fMin, const float fMax)
 
wxSlider * TieVSlider (const TranslatableString &Prompt, float &pos, const float fMin, const float fMax)
 
wxRadioButton * TieRadioButton ()
 This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair. More...
 
wxSpinCtrl * TieSpinCtrl (const TranslatableString &Prompt, int &Value, const int max, const int min=0)
 
virtual wxCheckBox * TieCheckBox (const TranslatableString &Prompt, const BoolSetting &Setting)
 
virtual wxCheckBox * TieCheckBoxOnRight (const TranslatableString &Prompt, const BoolSetting &Setting)
 
virtual wxChoice * TieChoice (const TranslatableString &Prompt, const ChoiceSetting &choiceSetting)
 
virtual wxChoice * TieNumberAsChoice (const TranslatableString &Prompt, const IntSetting &Setting, const TranslatableStrings &Choices, const std::vector< int > *pInternalChoices=nullptr, int iNoMatchSelector=0)
 
virtual wxTextCtrl * TieTextBox (const TranslatableString &Prompt, const StringSetting &Setting, const int nChars)
 
virtual wxTextCtrl * TieIntegerTextBox (const TranslatableString &Prompt, const IntSetting &Setting, const int nChars)
 
virtual wxTextCtrl * TieNumericTextBox (const TranslatableString &Prompt, const DoubleSetting &Setting, const int nChars)
 
virtual wxSlider * TieSlider (const TranslatableString &Prompt, const IntSetting &Setting, const int max, const int min=0)
 
virtual wxSpinCtrl * TieSpinCtrl (const TranslatableString &Prompt, const IntSetting &Setting, const int max, const int min)
 
void SetBorder (int Border)
 
int GetBorder () const noexcept
 
void SetSizerProportion (int iProp)
 
void SetStretchyCol (int i)
 Used to modify an already placed FlexGridSizer to make a column stretchy. More...
 
void SetStretchyRow (int i)
 Used to modify an already placed FlexGridSizer to make a row stretchy. More...
 
wxWindow * GetParent ()
 
ShuttleGuiBaseProp (int iProp)
 
void UseUpId ()
 
wxSizer * GetSizer ()
 

Static Public Member Functions

static void 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 241 of file ShuttleGui.h.

Constructor & Destructor Documentation

◆ ShuttleGuiBase()

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

Definition at line 128 of file ShuttleGui.cpp.

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

◆ ~ShuttleGuiBase()

ShuttleGuiBase::~ShuttleGuiBase ( )
virtual

Definition at line 139 of file ShuttleGui.cpp.

140 {
141 }

Member Function Documentation

◆ AddBitmapButton()

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

Definition at line 379 of file ShuttleGui.cpp.

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

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

Referenced by ErrorReportDialog::ErrorReportDialog(), and 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 360 of file ShuttleGui.cpp.

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

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(), ErrorReportDialog::ErrorReportDialog(), ExportCL::Export(), ImportRawDialog::ImportRawDialog(), BenchmarkDialog::MakeBenchmarkDialog(), ApplyMacroDialog::OnApplyToFiles(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AutoRecoveryDialog::PopulateOrExchange(), MacroCommandDialog::PopulateOrExchange(), ApplyMacroDialog::PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegCustomOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), 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(), LogWindow::Show(), HelpSystem::ShowHtmlText(), UpdateNoticeDialog::UpdateNoticeDialog(), UpdatePopupDialog::UpdatePopupDialog(), 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 309 of file ShuttleGui.cpp.

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

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(), UpdatePopupDialog::UpdatePopupDialog(), 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 343 of file ShuttleGui.cpp.

344 {
345  HandleOptionality( Prompt );
346  AddPrompt( Prompt );
347  UseUpId();
348  if( mShuttleMode != eIsCreating )
349  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxCheckBox);
350  wxCheckBox * pCheckBox;
351  miProp=0;
352  mpWind = pCheckBox = safenew wxCheckBox(GetParent(), miId, wxT(""), wxDefaultPosition, wxDefaultSize,
353  GetStyle( 0 ));
354  pCheckBox->SetValue(Selected);
355  pCheckBox->SetName(Prompt.Stripped().Translation());
356  UpdateSizers();
357  return pCheckBox;
358 }

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

435 {
436  return AddChoice(
437  Prompt, choices, make_iterator_range( choices ).index( Selected ) );
438 }

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

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

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

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

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

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

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

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

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(), AccessibleLinksFormatter::Populate(), AutoRecoveryDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ExportFFmpegOptions::PopulateOrExchange(), FFmpegNotFoundDialog::PopulateOrExchange(), LabelDialog::PopulateOrExchange(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), ApplicationPrefs::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), ModulePrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), UpdateNoticeDialog::UpdateNoticeDialog(), 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 768 of file ShuttleGui.cpp.

769 {
770  UseUpId();
771  if( mShuttleMode != eIsCreating )
772  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxGrid);
773  wxGrid * pGrid;
774  SetProportions( 1 );
775  mpWind = pGrid = safenew wxGrid(GetParent(), miId, wxDefaultPosition,
776  wxDefaultSize, GetStyle( wxWANTS_CHARS ));
777  pGrid->SetMinSize( wxSize( 120, 150 ));
778  UpdateSizers();
779  return pGrid;
780 }

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

869 {
870  UseUpId();
871  if( mShuttleMode != eIsCreating )
872 // return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wx);
873  return;
874  wxBitmapButton * pBtn;
875  mpWind = pBtn = safenew wxBitmapButton(GetParent(), miId, *pBmp,
876  wxDefaultPosition, wxDefaultSize, GetStyle( wxBU_AUTODRAW ) );
877  pBtn->SetWindowStyle( wxBORDER_NONE );
878  pBtn->SetCanFocus(false);
879  UpdateSizersC();
880 }

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

754 {
755  UseUpId();
756  if( mShuttleMode != eIsCreating )
757  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxListBox);
758  wxListBox * pListBox;
759  SetProportions( 1 );
760  mpWind = pListBox = safenew wxListBox(GetParent(), miId,
761  wxDefaultPosition, wxDefaultSize, choices, GetStyle(0));
762  pListBox->SetMinSize( wxSize( 120,150 ));
763  UpdateSizers();
764  return pListBox;
765 }

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

786 {
787  UseUpId();
788  if( mShuttleMode != eIsCreating )
789  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxListCtrl);
790  wxListCtrl * pListCtrl;
791  SetProportions( 1 );
792  mpWind = pListCtrl = safenew wxListCtrl(GetParent(), miId,
793  wxDefaultPosition, wxDefaultSize, GetStyle( wxLC_ICON ));
794  pListCtrl->SetMinSize( wxSize( 120,150 ));
795  UpdateSizers();
796 
797  DoInsertListColumns( pListCtrl, listControlStyles, columns );
798 
799  return pListCtrl;
800 }

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

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

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

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

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

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

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

570 {
571  return DoAddRadioButton( Prompt, wxRB_GROUP, selector, initValue );
572 }

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

576 {
577  return DoAddRadioButton( Prompt, 0, selector, initValue );
578 }

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

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

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

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

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

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

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

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

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

Referenced by NyquistEffect::BuildEffectWindow(), DoTieTextBox(), ErrorReportDialog::ErrorReportDialog(), 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 712 of file ShuttleGui.cpp.

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

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(), LogWindow::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 281 of file ShuttleGui.cpp.

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

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

855 {
856  UseUpId();
857  if( mShuttleMode != eIsCreating )
858  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxTreeCtrl);
859  wxTreeCtrl * pTreeCtrl;
860  SetProportions( 1 );
861  mpWind = pTreeCtrl = safenew wxTreeCtrl(GetParent(), miId, wxDefaultPosition, wxDefaultSize,
862  GetStyle( wxTR_HAS_BUTTONS ));
863  pTreeCtrl->SetMinSize( wxSize( 120,650 ));
864  UpdateSizers();
865  return pTreeCtrl;
866 }

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

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

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

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

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

Referenced by NyquistEffect::BuildPromptWindow(), ErrorReportDialog::ErrorReportDialog(), ExportMixerDialog::ExportMixerDialog(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), HistoryDialog::Populate(), AccessibleLinksFormatter::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(), LibraryPrefs::PopulateOrExchange(), and UpdateNoticeDialog::UpdateNoticeDialog().

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,
int  PositionFlags = wxALIGN_CENTRE 
)

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

Definition at line 299 of file ShuttleGui.cpp.

300 {
301  if( mShuttleMode != eIsCreating )
302  return pWindow;
303  mpWind = pWindow;
304  SetProportions( 0 );
305  UpdateSizersCore(false, PositionFlags | wxALL);
306  return pWindow;
307 }

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

Referenced by anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), NyquistEffect::BuildEffectWindow(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), ErrorDialog::ErrorDialog(), ErrorReportDialog::ErrorReportDialog(), ExportMixerDialog::ExportMixerDialog(), LabelTrackMenuTable::OnSetFont(), ExportCL::OptionsCreate(), ExportFFmpeg::OptionsCreate(), ExportFLAC::OptionsCreate(), ExportMP3::OptionsCreate(), ExportOGG::OptionsCreate(), ExportPCM::OptionsCreate(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AccessibleLinksFormatter::Populate(), NyqBench::PopulateOrExchange(), 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(), SliderDialog::SliderDialog(), and UpdatePopupDialog::UpdatePopupDialog().

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

2089 {
2090  if ( step == 0 ) {
2091  // Do these steps before adding the window to the sizer
2092  if( item.mUseBestSize )
2093  pWind->SetMinSize( pWind->GetBestSize() );
2094  else if( item.mHasMinSize )
2095  pWind->SetMinSize( item.mMinSize );
2096 
2097  if ( item.mWindowSize != wxSize{} )
2098  pWind->SetSize( item.mWindowSize );
2099  }
2100  else if ( step == 1) {
2101  // Apply certain other optional window attributes here
2102 
2103  if ( item.mValidatorSetter )
2104  item.mValidatorSetter( pWind );
2105 
2106  if ( !item.mToolTip.empty() )
2107  pWind->SetToolTip( item.mToolTip.Translation() );
2108 
2109  if ( !item.mName.empty() ) {
2110  pWind->SetName( item.mName.Stripped().Translation() );
2111 #ifndef __WXMAC__
2112  if (auto pButton = dynamic_cast< wxBitmapButton* >( pWind ))
2113  pButton->SetLabel( item.mName.Translation() );
2114 #endif
2115  }
2116 
2117  if ( !item.mNameSuffix.empty() )
2118  pWind->SetName(
2119  pWind->GetName() + " " + item.mNameSuffix.Translation() );
2120 
2121  if (item.mFocused)
2122  pWind->SetFocus();
2123 
2124  if (item.mDisabled)
2125  pWind->Enable( false );
2126 
2127  for (auto &pair : item.mRootConnections)
2128  pWind->Connect( pair.first, pair.second, nullptr, pDlg );
2129  }
2130 }

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

550 {
551  const auto translated = Prompt.Translation();
554  UseUpId();
555  if( mShuttleMode != eIsCreating )
556  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxRadioButton);
557  wxRadioButton * pRad;
558  mpWind = pRad = safenew wxRadioButton(GetParent(), miId, translated,
559  wxDefaultPosition, wxDefaultSize, GetStyle( style ) );
560  mpWind->SetName(wxStripMenuCodes(translated));
561  if ( style )
562  pRad->SetValue( true );
563  UpdateSizers();
564  pRad->SetValue( selector == initValue );
565  return pRad;
566 }

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

1248 {
1249  wxASSERT( mpShuttle );
1250  mpShuttle->TransferWrappedType( Name, WrappedRef );
1251 }

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

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

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

1818 {
1819  // Get value and create
1820  if( mShuttleMode == eIsCreating )
1821  {
1822  return (iStep==1) || (iStep==2);
1823  }
1824  // Like creating, get the value and set.
1826  {
1827  return (iStep==1) || (iStep==2);
1828  }
1830  {
1831  return (iStep==2) || (iStep==3);
1832  }
1834  return iStep ==2;
1835  wxASSERT( false );
1836  return false;
1837 }

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

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

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

1296 {
1297  HandleOptionality( Prompt );
1298  // The Add function does a UseUpId(), so don't do it here in that case.
1299  if( mShuttleMode == eIsCreating )
1300  return AddCheckBoxOnRight( Prompt, WrappedRef.ReadAsString() == wxT("true"));
1301 
1302  UseUpId();
1303 
1304  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1305  wxCheckBox * pCheckBox = wxDynamicCast(pWnd, wxCheckBox);
1306 
1307  switch( mShuttleMode )
1308  {
1309  // IF setting internal storage from the controls.
1310  case eIsGettingMetadata:
1311  break;
1312  case eIsGettingFromDialog:
1313  {
1314  wxASSERT( pCheckBox );
1315  WrappedRef.WriteToAsBool( pCheckBox->GetValue() );
1316  }
1317  break;
1318  case eIsSettingToDialog:
1319  {
1320  wxASSERT( pCheckBox );
1321  pCheckBox->SetValue( WrappedRef.ReadAsBool() );
1322  }
1323  break;
1324  default:
1325  wxASSERT( false );
1326  break;
1327  }
1328  return pCheckBox;
1329 }

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

1410 {
1411  HandleOptionality( Prompt );
1412  // The Add function does a UseUpId(), so don't do it here in that case.
1413  if( mShuttleMode == eIsCreating )
1414  return AddNumericTextBox( Prompt, WrappedRef.ReadAsString(), nChars );
1415 
1416  UseUpId();
1417  wxTextCtrl * pTextBox=NULL;
1418 
1419  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1420  pTextBox = wxDynamicCast(pWnd, wxTextCtrl);
1421 
1422  switch( mShuttleMode )
1423  {
1424  // IF setting internal storage from the controls.
1425  case eIsGettingMetadata:
1426  break;
1427  case eIsGettingFromDialog:
1428  {
1429  wxASSERT( pTextBox );
1430  WrappedRef.WriteToAsString( pTextBox->GetValue() );
1431  }
1432  break;
1433  case eIsSettingToDialog:
1434  {
1435  wxASSERT( pTextBox );
1436  pTextBox->SetValue( WrappedRef.ReadAsString() );
1437  }
1438  break;
1439  default:
1440  wxASSERT( false );
1441  break;
1442  }
1443  return pTextBox;
1444 }

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

1449 {
1450  HandleOptionality( Prompt );
1451  // The Add function does a UseUpId(), so don't do it here in that case.
1452  if( mShuttleMode != eIsCreating )
1453  UseUpId();
1454  wxSlider * pSlider=NULL;
1455  switch( mShuttleMode )
1456  {
1457  case eIsCreating:
1458  {
1459  pSlider = AddSlider( Prompt, WrappedRef.ReadAsInt(), max, min );
1460  }
1461  break;
1462  // IF setting internal storage from the controls.
1463  case eIsGettingMetadata:
1464  break;
1465  case eIsGettingFromDialog:
1466  {
1467  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1468  pSlider = wxDynamicCast(pWnd, wxSlider);
1469  wxASSERT( pSlider );
1470  WrappedRef.WriteToAsInt( pSlider->GetValue() );
1471  }
1472  break;
1473  case eIsSettingToDialog:
1474  {
1475  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1476  pSlider = wxDynamicCast(pWnd, wxSlider);
1477  wxASSERT( pSlider );
1478  pSlider->SetValue( WrappedRef.ReadAsInt() );
1479  }
1480  break;
1481  default:
1482  wxASSERT( false );
1483  break;
1484  }
1485  return pSlider;
1486 }

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

1334 {
1335  HandleOptionality( Prompt );
1336  // The Add function does a UseUpId(), so don't do it here in that case.
1337  if( mShuttleMode == eIsCreating )
1338  return AddSpinCtrl( Prompt, WrappedRef.ReadAsInt(), max, min );
1339 
1340  UseUpId();
1341  wxSpinCtrl * pSpinCtrl=NULL;
1342 
1343  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1344  pSpinCtrl = wxDynamicCast(pWnd, wxSpinCtrl);
1345 
1346  switch( mShuttleMode )
1347  {
1348  // IF setting internal storage from the controls.
1349  case eIsGettingMetadata:
1350  break;
1351  case eIsGettingFromDialog:
1352  {
1353  wxASSERT( pSpinCtrl );
1354  WrappedRef.WriteToAsInt( pSpinCtrl->GetValue() );
1355  }
1356  break;
1357  case eIsSettingToDialog:
1358  {
1359  wxASSERT( pSpinCtrl );
1360  pSpinCtrl->SetValue( WrappedRef.ReadAsInt() );
1361  }
1362  break;
1363  default:
1364  wxASSERT( false );
1365  break;
1366  }
1367  return pSpinCtrl;
1368 }

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

1372 {
1373  HandleOptionality( Prompt );
1374  // The Add function does a UseUpId(), so don't do it here in that case.
1375  if( mShuttleMode == eIsCreating )
1376  return AddTextBox( Prompt, WrappedRef.ReadAsString(), nChars );
1377 
1378  UseUpId();
1379  wxTextCtrl * pTextBox=NULL;
1380 
1381  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1382  pTextBox = wxDynamicCast(pWnd, wxTextCtrl);
1383 
1384  switch( mShuttleMode )
1385  {
1386  // IF setting internal storage from the controls.
1387  case eIsGettingMetadata:
1388  break;
1389  case eIsGettingFromDialog:
1390  {
1391  wxASSERT( pTextBox );
1392  WrappedRef.WriteToAsString( pTextBox->GetValue() );
1393  }
1394  break;
1395  case eIsSettingToDialog:
1396  {
1397  wxASSERT( pTextBox );
1398  pTextBox->SetValue( WrappedRef.ReadAsString() );
1399  }
1400  break;
1401  default:
1402  wxASSERT( false );
1403  break;
1404  }
1405  return pTextBox;
1406 }

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

1178 {
1179  if( mShuttleMode != eIsCreating )
1180  return;
1181  PopSizer();
1182 }

References eIsCreating, mShuttleMode, and PopSizer().

Referenced by ApplyMacroDialog::ApplyMacroToProject(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), Exporter::CreateUserPane(), ErrorDialog::ErrorDialog(), ErrorReportDialog::ErrorReportDialog(), ExportMixerDialog::ExportMixerDialog(), BenchmarkDialog::MakeBenchmarkDialog(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), ApplyMacroDialog::OnApplyToFiles(), MeterPanel::OnPreferences(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), EffectUIHost::OnSaveAs(), ExportPlugin::OptionsCreate(), FrequencyPlotDialog::Populate(), AccessibleLinksFormatter::Populate(), NyqBench::PopulateOrExchange(), 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(), LogWindow::Show(), DeviceToolBar::ShowComboDialog(), HelpSystem::ShowHtmlText(), HelpSystem::ShowInfoDialog(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), UpdateNoticeDialog::UpdateNoticeDialog(), UpdatePopupDialog::UpdatePopupDialog(), and AudacityFileConfig::Warn().

Here is the call graph for this function:

◆ EndInvisiblePanel()

void ShuttleGuiBase::EndInvisiblePanel ( )

Definition at line 1155 of file ShuttleGui.cpp.

1156 {
1157  EndPanel();
1158 }

References EndPanel().

Here is the call graph for this function:

◆ EndMultiColumn()

void ShuttleGuiBase::EndMultiColumn ( )

Definition at line 1238 of file ShuttleGui.cpp.

1239 {
1240  if( mShuttleMode != eIsCreating )
1241  return;
1242  PopSizer();
1243 }

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(), SetWaveClipNameCommand::PopulateOrExchange(), and SetTrackNameCommand::PopulateOrExchange().

Here is the call graph for this function:

◆ EndNotebook()

void ShuttleGuiBase::EndNotebook ( )

Definition at line 1040 of file ShuttleGui.cpp.

1041 {
1042  //PopSizer();
1043  mpParent = mpParent->GetParent();
1044 }

References mpParent.

◆ EndNotebookPage()

void ShuttleGuiBase::EndNotebookPage ( )

Definition at line 1091 of file ShuttleGui.cpp.

1092 {
1093  if( mShuttleMode != eIsCreating )
1094  return;
1095  PopSizer();
1096  mpParent = mpParent->GetParent();
1097 }

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

1019 {
1020  if( mShuttleMode != eIsCreating )
1021  return;
1022  PopSizer();
1023  mpParent = mpParent->GetParent();
1024 }

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

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

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

1613 {
1614  // too few buttons?
1615  wxASSERT( mRadioCount == mRadioSymbols.size() );
1616 
1619  mRadioValue.reset();// Clear it out...
1620  mRadioSettingName = wxT("");
1621  mRadioCount = -1; // So we detect a problem.
1622  mRadioSymbols = {};
1623 }

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

972 {
973  if( mShuttleMode != eIsCreating )
974  return;
975  wxSize ScrollSize = mpSizer->GetMinSize();
976  int yMin = ScrollSize.y+4;
977  int xMin = ScrollSize.x+4;
978  if( yMin > 400)
979  {
980  yMin = 400;
981  xMin+=50;// extra space for vertical scrollbar.
982  }
983 
984  mpParent->SetMinSize( wxSize(xMin, yMin) );
985 
986  PopSizer();
987  mpParent = mpParent->GetParent();
988 }

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

Referenced by NyquistEffect::BuildEffectWindow(), VampEffect::PopulateOrExchange(), ApplicationPrefs::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 1061 of file ShuttleGui.cpp.

1062 {
1063  //PopSizer();
1064  mpParent = mpParent->GetParent();
1065 }

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

923 {
924  if( mShuttleMode != eIsCreating )
925  return;
926  PopSizer();
927  mpParent = mpParent->GetParent();
928 }

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(), ApplicationPrefs::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 369 of file ShuttleGui.h.

369 {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 367 of file ShuttleGui.h.

367 {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 1203 of file ShuttleGui.cpp.

1204 {
1205  if( mShuttleMode != eIsCreating )
1206  return;
1207  PopSizer();
1208 }

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(), ErrorReportDialog::ErrorReportDialog(), ImportRawDialog::ImportRawDialog(), AudacityCommandDialog::Init(), LongMessageDialog::Init(), EffectDialog::Init(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), 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(), ApplicationPrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), PrefsDialog::PrefsDialog(), LogWindow::Show(), DeviceToolBar::ShowComboDialog(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowInfoDialog(), SliderDialog::SliderDialog(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), UpdateNoticeDialog::UpdateNoticeDialog(), UpdatePopupDialog::UpdatePopupDialog(), AudacityFileConfig::Warn(), and WarningDialog::WarningDialog().

Here is the call graph for this function:

◆ EndWrapLay()

void ShuttleGuiBase::EndWrapLay ( )

Definition at line 1221 of file ShuttleGui.cpp.

1222 {
1223  if (mShuttleMode != eIsCreating)
1224  return;
1225 
1226  PopSizer();
1227 }

References eIsCreating, mShuttleMode, and PopSizer().

Referenced by AccessibleLinksFormatter::Populate().

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

◆ GetBorder()

int ShuttleGuiBase::GetBorder ( ) const
noexcept

Definition at line 196 of file ShuttleGui.cpp.

197 {
198  return miBorder;
199 }

References miBorder.

Referenced by AccessibleLinksFormatter::Populate().

Here is the caller graph for this function:

◆ GetParent()

wxWindow* ShuttleGuiBase::GetParent ( )
inline

Definition at line 496 of file ShuttleGui.h.

497  {
498  // This assertion justifies the use of safenew in many places where GetParent()
499  // is used to construct a window
500  wxASSERT(mpParent != NULL);
501  return mpParent;
502  }

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(), ErrorReportDialog::ErrorReportDialog(), ExportMixerDialog::ExportMixerDialog(), LabelTrackMenuTable::OnSetFont(), ExportCL::OptionsCreate(), ExportFFmpeg::OptionsCreate(), ExportFLAC::OptionsCreate(), ExportMP3::OptionsCreate(), ExportOGG::OptionsCreate(), ExportPCM::OptionsCreate(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AccessibleLinksFormatter::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(), TieRadioButton(), and UpdatePopupDialog::UpdatePopupDialog().

◆ GetSizer()

wxSizer* ShuttleGuiBase::GetSizer ( )
inline

Definition at line 506 of file ShuttleGui.h.

506 {return mpSizer;}

Referenced by EffectEqualization::PopulateOrExchange().

Here is the caller graph for this function:

◆ GetStyle()

long ShuttleGuiBase::GetStyle ( long  Style)
protected

Definition at line 2213 of file ShuttleGui.cpp.

2214 {
2215  if( mItem.miStyle )
2216  style = mItem.miStyle;
2217  mItem.miStyle = 0;
2218  return style;
2219 }

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

225 {
226  // If creating, will be handled by an AddPrompt.
227  if( mShuttleMode == eIsCreating )
228  return;
229  //wxLogDebug( "Optionality: [%s] Id:%i (%i)", Prompt.c_str(), miId, miIdSetByUser ) ;
230  if( mpbOptionalFlag ){
231  bool * pVar = mpbOptionalFlag;
232  mpbOptionalFlag = nullptr;
233  TieCheckBox( Prompt, *pVar);
234  }
235 }

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

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

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

2200 {
2201  mSizerDepth--;
2202  wxASSERT( mSizerDepth >=0 );
2204 }

References mpSizer, mSizerDepth, and pSizerStack.

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

Here is the caller graph for this function:

◆ Prop()

ShuttleGuiBase & ShuttleGuiBase::Prop ( int  iProp)

Definition at line 882 of file ShuttleGui.cpp.

883 {
884  miPropSetByUser = iProp;
885  return *this;
886 }

References miPropSetByUser.

Referenced by ShuttleGui::Prop().

Here is the caller graph for this function:

◆ PushSizer()

void ShuttleGuiBase::PushSizer ( )
protected

Definition at line 2206 of file ShuttleGui.cpp.

2207 {
2208  mSizerDepth++;
2209  wxASSERT( mSizerDepth < nMaxNestedSizers );
2211 }

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

189 {
190  miIdSetByUser = -1;
191  miId = -1;
192  miIdNext = 3000;
193 }

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

489 {miBorder = Border;};

Referenced by ApplyMacroDialog::ApplyMacroToProject(), ExportMP3::AskResample(), ExportFFmpeg::AskResample(), ContrastDialog::ContrastDialog(), ErrorDialog::ErrorDialog(), ErrorReportDialog::ErrorReportDialog(), ExportMixerDialog::ExportMixerDialog(), ImportRawDialog::ImportRawDialog(), AudacityCommandDialog::Init(), LongMessageDialog::Init(), EffectDialog::Init(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), RateMenuTable::OnRateOther(), EffectUIHost::OnSaveAs(), FrequencyPlotDialog::Populate(), HistoryDialog::Populate(), SplashDialog::Populate(), AccessibleLinksFormatter::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(), ApplicationPrefs::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(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), UpdateNoticeDialog::UpdateNoticeDialog(), UpdatePopupDialog::UpdatePopupDialog(), AudacityFileConfig::Warn(), and WarningDialog::WarningDialog().

◆ SetProportions()

void ShuttleGuiBase::SetProportions ( int  Default)
protected

Definition at line 2075 of file ShuttleGui.cpp.

2076 {
2077  if( miPropSetByUser >=0 )
2078  {
2080  miPropSetByUser =-1;
2081  return;
2082  }
2083  miProp = Default;
2084 }

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

491 {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 202 of file ShuttleGui.cpp.

203 {
204  if( mShuttleMode != eIsCreating )
205  return;
206  wxFlexGridSizer *pSizer = wxDynamicCast(mpSizer, wxFlexGridSizer);
207  wxASSERT( pSizer );
208  pSizer->AddGrowableCol( i, 1 );
209 }

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

213 {
214  if( mShuttleMode != eIsCreating )
215  return;
216  wxFlexGridSizer *pSizer = wxDynamicCast(mpSizer, wxFlexGridSizer);
217  wxASSERT( pSizer );
218  pSizer->AddGrowableRow( i, 1 );
219 }

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

1168 {
1169  if( mShuttleMode != eIsCreating )
1170  return;
1171  miSizerProp=iProp;
1172  mpSubSizer = std::make_unique<wxBoxSizer>( wxHORIZONTAL );
1173  // PRL: wxALL has no effect because UpdateSizersCore ignores border
1174  UpdateSizersCore( false, PositionFlags | wxALL );
1175 }

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(), ErrorReportDialog::ErrorReportDialog(), ExportCL::Export(), ExportMixerDialog::ExportMixerDialog(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), ApplyMacroDialog::OnApplyToFiles(), MeterPanel::OnPreferences(), RateMenuTable::OnRateOther(), TrackActions::Handler::OnResample(), EffectUIHost::OnSaveAs(), ExportPlugin::OptionsCreate(), FrequencyPlotDialog::Populate(), AccessibleLinksFormatter::Populate(), NyqBench::PopulateOrExchange(), 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(), LogWindow::Show(), DeviceToolBar::ShowComboDialog(), HelpSystem::ShowHtmlText(), HelpSystem::ShowInfoDialog(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), UpdateNoticeDialog::UpdateNoticeDialog(), UpdatePopupDialog::UpdatePopupDialog(), and AudacityFileConfig::Warn().

Here is the call graph for this function:

◆ StartInvisiblePanel()

wxPanel * ShuttleGuiBase::StartInvisiblePanel ( )

Definition at line 1132 of file ShuttleGui.cpp.

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

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

1230 {
1231  if( mShuttleMode != eIsCreating )
1232  return;
1233  mpSubSizer = std::make_unique<wxFlexGridSizer>( nCols );
1234  // PRL: wxALL has no effect because UpdateSizersCore ignores border
1235  UpdateSizersCore( false, PositionFlags | wxALL );
1236 }

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(), SetWaveClipNameCommand::PopulateOrExchange(), and SetTrackNameCommand::PopulateOrExchange().

Here is the call graph for this function:

◆ StartNotebook()

wxNotebook * ShuttleGuiBase::StartNotebook ( )

Definition at line 1026 of file ShuttleGui.cpp.

1027 {
1028  UseUpId();
1029  if( mShuttleMode != eIsCreating )
1030  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxNotebook);
1031  wxNotebook * pNotebook;
1032  mpWind = pNotebook = safenew wxNotebook(GetParent(),
1033  miId, wxDefaultPosition, wxDefaultSize, GetStyle( 0 ));
1034  SetProportions( 1 );
1035  UpdateSizers();
1036  mpParent = pNotebook;
1037  return pNotebook;
1038 }

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

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

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

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

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(), LogWindow::Show(), HelpSystem::ShowHtmlText(), and UpdateNoticeDialog::UpdateNoticeDialog().

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

1596 {
1597  mRadioSymbols = Setting.GetSymbols();
1598 
1599  // Configure the generic type mechanism to use OUR string.
1600  mRadioValueString = Setting.Default().Internal();
1602 
1603  // Now actually start the radio button group.
1604  mRadioSettingName = Setting.Key();
1605  mRadioCount = 0;
1606  if( mShuttleMode == eIsCreating )
1607  DoDataShuttle( Setting.Key(), *mRadioValue );
1608 }

References DoDataShuttle(), eIsCreating, Optional< X >::emplace(), 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 938 of file ShuttleGui.cpp.

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

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

Referenced by NyquistEffect::BuildEffectWindow(), VampEffect::PopulateOrExchange(), ApplicationPrefs::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 1047 of file ShuttleGui.cpp.

1048 {
1049  UseUpId();
1050  if( mShuttleMode != eIsCreating )
1051  return wxDynamicCast(wxWindow::FindWindowById( miId, mpDlg), wxSimplebook);
1052  wxSimplebook * pNotebook;
1053  mpWind = pNotebook = safenew wxSimplebook(GetParent(),
1054  miId, wxDefaultPosition, wxDefaultSize, GetStyle( 0 ));
1055  SetProportions( 1 );
1056  UpdateSizers();
1057  mpParent = pNotebook;
1058  return pNotebook;
1059 }

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

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

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(), ApplicationPrefs::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 368 of file ShuttleGui.h.

368 {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 366 of file ShuttleGui.h.

366 {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 1184 of file ShuttleGui.cpp.

1185 {
1186  if( mShuttleMode != eIsCreating )
1187  return;
1188  miSizerProp=iProp;
1189  mpSubSizer = std::make_unique<wxBoxSizer>( wxVERTICAL );
1190  UpdateSizers();
1191 }

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(), ErrorReportDialog::ErrorReportDialog(), ImportRawDialog::ImportRawDialog(), AudacityCommandDialog::Init(), LongMessageDialog::Init(), EffectDialog::Init(), LangChoiceDialog::LangChoiceDialog(), BenchmarkDialog::MakeBenchmarkDialog(), NoUpdatesAvailableDialog::NoUpdatesAvailableDialog(), 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(), ApplicationPrefs::PopulateOrExchange(), PlaybackPrefs::PopulateOrExchange(), PrefsDialog::PrefsDialog(), LogWindow::Show(), DeviceToolBar::ShowComboDialog(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), HelpSystem::ShowInfoDialog(), SliderDialog::SliderDialog(), UnwritableLocationErrorDialog::UnwritableLocationErrorDialog(), UpdateNoticeDialog::UpdateNoticeDialog(), UpdatePopupDialog::UpdatePopupDialog(), 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 1193 of file ShuttleGui.cpp.

1194 {
1195  if( mShuttleMode != eIsCreating )
1196  return;
1197  miSizerProp=iProp;
1198  mpSubSizer = std::make_unique<wxBoxSizer>( wxVERTICAL );
1199  // PRL: wxALL has no effect because UpdateSizersCore ignores border
1200  UpdateSizersCore( false, PositionFlags | wxALL );
1201 }

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

Here is the call graph for this function:

◆ StartWrapLay()

void ShuttleGuiBase::StartWrapLay ( int  PositionFlags = wxEXPAND,
int  iProp = 0 
)

Definition at line 1210 of file ShuttleGui.cpp.

1211 {
1212  if (mShuttleMode != eIsCreating)
1213  return;
1214 
1215  miSizerProp = iProp;
1216  mpSubSizer = std::make_unique<wxWrapSizer>(wxHORIZONTAL, 0);
1217 
1218  UpdateSizersCore(false, PositionFlags | wxALL);
1219 }

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

Referenced by AccessibleLinksFormatter::Populate().

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

◆ TieCheckBox() [1/2]

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

Definition at line 1629 of file ShuttleGui.cpp.

1630 {
1631  WrappedType WrappedRef( Var );
1632  return DoTieCheckBox( Prompt, WrappedRef );
1633 }

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(), ApplicationPrefs::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 BoolSetting 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 1842 of file ShuttleGui.cpp.

1845 {
1846  wxCheckBox * pCheck=NULL;
1847 
1848  auto Value = Setting.GetDefault();
1849  WrappedType WrappedRef( Value );
1850  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1851  if( DoStep(2) ) pCheck = DoTieCheckBox( Prompt, WrappedRef );
1852  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1853 
1854  return pCheck;
1855 }

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

Here is the call graph for this function:

◆ TieCheckBoxOnRight() [1/2]

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

Definition at line 1636 of file ShuttleGui.cpp.

1637 {
1638  // Only does anything different if it's creating.
1639  WrappedType WrappedRef( Var );
1640  if( mShuttleMode == eIsCreating )
1641  return AddCheckBoxOnRight( Prompt, WrappedRef.ReadAsString() == wxT("true") );
1642  return DoTieCheckBox( Prompt, WrappedRef );
1643 }

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

1862 {
1863  wxCheckBox * pCheck=NULL;
1864 
1865  auto Value = Setting.GetDefault();
1866  WrappedType WrappedRef( Value );
1867  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1868  if( DoStep(2) ) pCheck = DoTieCheckBoxOnRight( Prompt, WrappedRef );
1869  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1870 
1871  return pCheck;
1872 }

References DoDataShuttle(), DoStep(), DoTieCheckBoxOnRight(), Setting< T >::GetDefault(), and SettingBase::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 1971 of file ShuttleGui.cpp.

1974 {
1975  // Do this to force any needed migrations first
1976  choiceSetting.Read();
1977 
1978  const auto &symbols = choiceSetting.GetSymbols();
1979  const auto &SettingName = choiceSetting.Key();
1980  const auto &Default = choiceSetting.Default().Internal();
1981  const auto &Choices = symbols.GetMsgids();
1982  const auto &InternalChoices = symbols.GetInternals();
1983 
1984  wxChoice * pChoice=(wxChoice*)NULL;
1985 
1986  int TempIndex=0;
1987 // int TempIndex = TranslateToIndex( Default, InternalChoices );
1988  wxString TempStr = Default;
1989  WrappedType WrappedRef( TempStr );
1990  // Get from prefs does 1 and 2.
1991  // Put to prefs does 2 and 3.
1992  if( DoStep(1) ) DoDataShuttle( SettingName, WrappedRef ); // Get Index from Prefs.
1993  if( DoStep(1) ) TempIndex = TranslateToIndex( TempStr, InternalChoices ); // To an index
1994  if( DoStep(2) ) pChoice = TieChoice( Prompt, TempIndex, Choices );
1995  if( DoStep(3) ) TempStr = TranslateFromIndex( TempIndex, InternalChoices ); // To a string
1996  if( DoStep(3) ) DoDataShuttle( SettingName, WrappedRef ); // Put into Prefs.
1997  return pChoice;
1998 }

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

1493 {
1494  HandleOptionality( Prompt );
1495 
1496  // The Add function does a UseUpId(), so don't do it here in that case.
1497  if( mShuttleMode != eIsCreating )
1498  UseUpId();
1499 
1500  wxChoice * pChoice=NULL;
1501  switch( mShuttleMode )
1502  {
1503  case eIsCreating:
1504  {
1505  pChoice = AddChoice( Prompt, choices, Selected );
1506  ShuttleGui::SetMinSize(pChoice, choices);
1507  }
1508  break;
1509  // IF setting internal storage from the controls.
1510  case eIsGettingMetadata:
1511  break;
1512  case eIsGettingFromDialog:
1513  {
1514  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1515  pChoice = wxDynamicCast(pWnd, wxChoice);
1516  wxASSERT( pChoice );
1517  Selected = pChoice->GetSelection();
1518  }
1519  break;
1520  case eIsSettingToDialog:
1521  {
1522  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1523  pChoice = wxDynamicCast(pWnd, wxChoice);
1524  wxASSERT( pChoice );
1525  pChoice->SetSelection( Selected );
1526  }
1527  break;
1528  default:
1529  wxASSERT( false );
1530  break;
1531  }
1532  return pChoice;
1533 }

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

1731 {
1732  int Index = make_iterator_range( choices ).index( Selected );
1733  auto result = TieChoice( Prompt, Index, choices );
1734  if ( Index >= 0 && Index < choices.size() )
1735  Selected = choices[ Index ];
1736  else
1737  Selected = {};
1738  return result;
1739 }

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

1936 {
1937  wxTextCtrl * pText=(wxTextCtrl*)NULL;
1938 
1939  auto Value = Setting.GetDefault();
1940  WrappedType WrappedRef( Value );
1941  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1942  if( DoStep(2) ) pText = DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1943  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1944  return pText;
1945 }

References DoDataShuttle(), DoStep(), DoTieNumericTextBox(), Setting< T >::GetDefault(), and SettingBase::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 IntSetting 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 2011 of file ShuttleGui.cpp.

2017 {
2018  auto fn = [](int arg){ return wxString::Format( "%d", arg ); };
2019 
2020  wxArrayStringEx InternalChoices;
2021  if ( pInternalChoices )
2022  InternalChoices =
2023  transform_container<wxArrayStringEx>(*pInternalChoices, fn);
2024  else
2025  for ( int ii = 0; ii < (int)Choices.size(); ++ii )
2026  InternalChoices.push_back( fn( ii ) );
2027 
2028 
2029  const auto Default = Setting.GetDefault();
2030 
2031  miNoMatchSelector = iNoMatchSelector;
2032 
2033  long defaultIndex;
2034  if ( pInternalChoices )
2035  defaultIndex = make_iterator_range( *pInternalChoices ).index( Default );
2036  else
2037  defaultIndex = Default;
2038  if ( defaultIndex < 0 || defaultIndex >= (int)Choices.size() )
2039  defaultIndex = -1;
2040 
2041  ChoiceSetting choiceSetting{
2042  Setting.GetPath(),
2043  {
2044  ByColumns,
2045  Choices,
2046  InternalChoices,
2047  },
2048  defaultIndex
2049  };
2050 
2051  return ShuttleGuiBase::TieChoice( Prompt, choiceSetting );
2052 }

References ByColumns, fn, Setting< T >::GetDefault(), SettingBase::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 DoubleSetting 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 1950 of file ShuttleGui.cpp.

1954 {
1955  wxTextCtrl * pText=(wxTextCtrl*)NULL;
1956 
1957  auto Value = Setting.GetDefault();
1958  WrappedType WrappedRef( Value );
1959  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1960  if( DoStep(2) ) pText = DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1961  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1962  return pText;
1963 }

References DoDataShuttle(), DoStep(), DoTieNumericTextBox(), Setting< T >::GetDefault(), and SettingBase::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 1680 of file ShuttleGui.cpp.

1682 {
1683  WrappedType WrappedRef( Value );
1684  return DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1685 }

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

1675 {
1676  WrappedType WrappedRef( Value );
1677  return DoTieNumericTextBox( Prompt, WrappedRef, nChars );
1678 }

References DoTieNumericTextBox().

Referenced by LV2EffectSettingsDialog::PopulateOrExchange(), DragCommand::PopulateOrExchange(), SetClipCommand::PopulateOrExchange(), SetEnvelopeCommand::PopulateOrExchange(), SetLabelCommand::PopulateOrExchange(), SetProjectCommand::PopulateOrExchange(), SetTrackBase::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), DevicePrefs::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 1536 of file ShuttleGui.cpp.

1537 {
1538  wxASSERT( mRadioCount >= 0); // Did you remember to use StartRadioButtonGroup() ?
1539 
1540  EnumValueSymbol symbol;
1541  if (mRadioCount >= 0 && mRadioCount < (int)mRadioSymbols.size() )
1542  symbol = mRadioSymbols[ mRadioCount ];
1543 
1544  // In what follows, WrappedRef is used in read only mode, but we
1545  // don't have a 'read-only' version, so we copy to deal with the constness.
1546  auto Temp = symbol.Internal();
1547  wxASSERT( !Temp.empty() ); // More buttons than values?
1548 
1549  WrappedType WrappedRef( Temp );
1550 
1551  mRadioCount++;
1552 
1553  UseUpId();
1554  wxRadioButton * pRadioButton = NULL;
1555 
1556  switch( mShuttleMode )
1557  {
1558  case eIsCreating:
1559  {
1560  const auto &Prompt = symbol.Translation();
1561 
1562  mpWind = pRadioButton = safenew wxRadioButton(GetParent(), miId, Prompt,
1563  wxDefaultPosition, wxDefaultSize,
1564  (mRadioCount==1)?wxRB_GROUP:0);
1565 
1566  wxASSERT( WrappedRef.IsString() );
1567  wxASSERT( mRadioValue->IsString() );
1568  const bool value =
1569  (WrappedRef.ReadAsString() == mRadioValue->ReadAsString() );
1570  pRadioButton->SetValue( value );
1571 
1572  pRadioButton->SetName(wxStripMenuCodes(Prompt));
1573  UpdateSizers();
1574  }
1575  break;
1576  case eIsGettingMetadata:
1577  break;
1578  case eIsGettingFromDialog:
1579  {
1580  wxWindow * pWnd = wxWindow::FindWindowById( miId, mpDlg);
1581  pRadioButton = wxDynamicCast(pWnd, wxRadioButton);
1582  wxASSERT( pRadioButton );
1583  if( pRadioButton->GetValue() )
1584  mRadioValue->WriteToAsString( WrappedRef.ReadAsString() );
1585  }
1586  break;
1587  default:
1588  wxASSERT( false );
1589  break;
1590  }
1591  return pRadioButton;
1592 }

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

1881 {
1882  wxSlider * pSlider=NULL;
1883 
1884  auto Value = Setting.GetDefault();
1885  WrappedType WrappedRef( Value );
1886  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1887  if( DoStep(2) ) pSlider = DoTieSlider( Prompt, WrappedRef, max, min );
1888  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1889 
1890  return pSlider;
1891 }

References DoDataShuttle(), DoStep(), DoTieSlider(), Setting< T >::GetDefault(), SettingBase::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 1694 of file ShuttleGui.cpp.

1697 {
1698  WrappedType WrappedRef( pos );
1699  return DoTieSlider( Prompt, WrappedRef, max, min );
1700 }

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

1705 {
1706  const float RoundFix=0.0000001f;
1707  int iVal=(pos-fMin+RoundFix)*100.0/(fMax-fMin);
1708  wxSlider * pWnd = TieSlider( Prompt, iVal, 100 );
1709  pos = iVal*(fMax-fMin)*0.01+fMin;
1710  return pWnd;
1711 }

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

1689 {
1690  WrappedType WrappedRef( pos );
1691  return DoTieSlider( Prompt, WrappedRef, max, min );
1692 }

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

1900 {
1901  wxSpinCtrl * pSpinCtrl=NULL;
1902 
1903  auto Value = Setting.GetDefault();
1904  WrappedType WrappedRef( Value );
1905  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1906  if( DoStep(2) ) pSpinCtrl = DoTieSpinCtrl( Prompt, WrappedRef, max, min );
1907  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1908 
1909  return pSpinCtrl;
1910 }

References DoDataShuttle(), DoStep(), DoTieSpinCtrl(), Setting< T >::GetDefault(), SettingBase::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 1645 of file ShuttleGui.cpp.

1647 {
1648  WrappedType WrappedRef(Value);
1649  return DoTieSpinCtrl( Prompt, WrappedRef, max, min );
1650 }

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

1654 {
1655  WrappedType WrappedRef(Selected);
1656  return DoTieTextBox( Prompt, WrappedRef, nChars );
1657 }

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(), SetClipCommand::PopulateOrExchange(), SetLabelCommand::PopulateOrExchange(), SetProjectCommand::PopulateOrExchange(), SetTrackStatusCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), DirectoriesPrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), TracksPrefs::PopulateOrExchange(), SetWaveClipNameCommand::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 StringSetting 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 1914 of file ShuttleGui.cpp.

1918 {
1919  wxTextCtrl * pText=(wxTextCtrl*)NULL;
1920 
1921  auto Value = Setting.GetDefault();
1922  WrappedType WrappedRef( Value );
1923  if( DoStep(1) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1924  if( DoStep(2) ) pText = DoTieTextBox( Prompt, WrappedRef, nChars );
1925  if( DoStep(3) ) DoDataShuttle( Setting.GetPath(), WrappedRef );
1926  return pText;
1927 }

References DoDataShuttle(), DoStep(), DoTieTextBox(), Setting< T >::GetDefault(), and SettingBase::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 1666 of file ShuttleGui.cpp.

1668 {
1669  WrappedType WrappedRef( Value );
1670  return DoTieTextBox( Prompt, WrappedRef, nChars );
1671 }

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

1661 {
1662  WrappedType WrappedRef( Selected );
1663  return DoTieTextBox( Prompt, WrappedRef, nChars );
1664 }

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

1716 {
1717  int iVal=(pos-fMin)*100.0/(fMax-fMin);
1718 // if( mShuttleMode == eIsCreating )
1719 // {
1720 // return AddVSlider( Prompt, iVal, 100 );
1721 // }
1722  wxSlider * pWnd = TieSlider( Prompt, iVal, 100 );
1723  pos = iVal*(fMax-fMin)*0.01+fMin;
1724  return pWnd;
1725 }

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

1760 {
1761  int n = nIn;
1762  if( n== wxNOT_FOUND )
1764  miNoMatchSelector = 0;
1765  if( n < (int)Choices.size() )
1766  {
1767  return Choices[n];
1768  }
1769  return wxT("");
1770 }

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

1750 {
1751  int n = make_iterator_range( Choices ).index( Value );
1752  if( n == wxNOT_FOUND )
1754  miNoMatchSelector = 0;
1755  return n;
1756 }

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

2188 { 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 2196 of file ShuttleGui.cpp.

2197 { 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 2191 of file ShuttleGui.cpp.

2192 { 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 2133 of file ShuttleGui.cpp.

2134 {
2135  if( mpWind && mpParent )
2136  {
2137  int useFlags = Flags;
2138 
2139  if ( !prompt && mItem.mWindowPositionFlags )
2140  // override the given Flags
2141  useFlags = mItem.mWindowPositionFlags;
2142 
2143  if (!prompt)
2144  ApplyItem( 0, mItem, mpWind, mpDlg );
2145 
2146  if( mpSizer){
2147  if( bPrepend )
2148  {
2149  mpSizer->Prepend(mpWind, miProp, useFlags, miBorder);
2150  }
2151  else
2152  {
2153  mpSizer->Add(mpWind, miProp, useFlags, miBorder);
2154  }
2155  }
2156 
2157  if (!prompt) {
2158  ApplyItem( 1, mItem, mpWind, mpDlg );
2159  // Reset to defaults
2160  mItem = {};
2161  }
2162  }
2163 
2164  if( mpSubSizer && mpSizer )
2165  {
2166  // When adding sizers into sizers, don't add a border.
2167  // unless it's a static box sizer.
2168  wxSizer *const pSubSizer = mpSubSizer.get();
2169  if (wxDynamicCast(pSubSizer, wxStaticBoxSizer))
2170  {
2171  mpSizer->Add( mpSubSizer.release(), miSizerProp, Flags , miBorder);
2172  }
2173  else
2174  {
2175  mpSizer->Add( mpSubSizer.release(), miSizerProp, Flags ,0);//miBorder);
2176  }
2177  mpSizer = pSubSizer;
2178  PushSizer();
2179  }
2180 
2181  mpWind = NULL;
2182  miProp = 0;
2183  miSizerProp =0;
2184 }

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(), StartWrapLay(), 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 2064 of file ShuttleGui.cpp.

2065 {
2066  if( miIdSetByUser > 0)
2067  {
2068  miId = miIdSetByUser;
2069  miIdSetByUser = -1;
2070  return;
2071  }
2072  miId = miIdNext++;
2073 }

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

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

◆ miId

int ShuttleGuiBase::miId
protected

◆ miIdNext

int ShuttleGuiBase::miIdNext
protected

Definition at line 546 of file ShuttleGui.h.

Referenced by ResetId(), and UseUpId().

◆ miIdSetByUser

int ShuttleGuiBase::miIdSetByUser
protected

Definition at line 547 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 535 of file ShuttleGui.h.

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

◆ miProp

int ShuttleGuiBase::miProp
protected

◆ miPropSetByUser

int ShuttleGuiBase::miPropSetByUser
protected

Definition at line 549 of file ShuttleGui.h.

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

◆ miSizerProp

int ShuttleGuiBase::miSizerProp
protected

◆ mItem

DialogDefinition::Item ShuttleGuiBase::mItem
protected

Definition at line 582 of file ShuttleGui.h.

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

◆ mpbOptionalFlag

bool* ShuttleGuiBase::mpbOptionalFlag
protected

Definition at line 551 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 533 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 576 of file ShuttleGui.h.

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

◆ mRadioSettingName

wxString ShuttleGuiBase::mRadioSettingName
private

Definition at line 574 of file ShuttleGui.h.

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

◆ mRadioSymbols

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

Definition at line 573 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 575 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 577 of file ShuttleGui.h.

Referenced by StartRadioButtonGroup().

◆ mShuttleMode

teShuttleMode ShuttleGuiBase::mShuttleMode
protected

◆ mSizerDepth

int ShuttleGuiBase::mSizerDepth
protected

Definition at line 540 of file ShuttleGui.h.

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

◆ pSizerStack

wxSizer* ShuttleGuiBase::pSizerStack[nMaxNestedSizers]
protected

Definition at line 531 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:193
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
WrappedType::ReadAsString
wxString ReadAsString()
Definition: WrappedType.cpp:42
ShuttleGuiBase::Init
void Init(bool vertical, wxSize minSize)
Definition: ShuttleGui.cpp:143
TranslatableString::empty
bool empty() const
Definition: TranslatableString.h:72
ShuttleGuiBase::mRadioValue
Optional< WrappedType > mRadioValue
The setting controlled by a group.
Definition: ShuttleGui.h:575
ShuttleGuiBase::AddCheckBoxOnRight
wxCheckBox * AddCheckBoxOnRight(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:343
ShuttleGuiBase::AddChoice
wxChoice * AddChoice(const TranslatableString &Prompt, const TranslatableStrings &choices, int Selected=-1)
Definition: ShuttleGui.cpp:398
wxSliderWrapper
wxSlider wxSliderWrapper
Definition: ShuttleGui.h:105
ShuttleGuiBase::AddCheckBox
wxCheckBox * AddCheckBox(const TranslatableString &Prompt, bool Selected)
Definition: ShuttleGui.cpp:309
make_iterator_range
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
Definition: MemoryX.h:551
ShuttleGuiBase::DoTieSpinCtrl
wxSpinCtrl * DoTieSpinCtrl(const TranslatableString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
Definition: ShuttleGui.cpp:1331
ShuttleGui::SetMinSize
static void SetMinSize(wxWindow *window, const TranslatableStrings &items)
Definition: ShuttleGui.cpp:2470
ShuttleGuiBase::HandleOptionality
void HandleOptionality(const TranslatableString &Prompt)
Definition: ShuttleGui.cpp:224
eIsGettingFromDialog
@ eIsGettingFromDialog
Definition: ShuttleGui.h:39
ComponentInterfaceSymbol::Translation
const wxString Translation() const
Definition: ComponentInterfaceSymbol.h:58
fn
static const auto fn
Definition: WaveformView.cpp:1108
DialogDefinition::Item::mDisabled
bool mDisabled
Definition: ShuttleGui.h:235
SettingBase::GetPath
const wxString & GetPath() const
Definition: Prefs.h:75
wxNotebookPage
wxWindow wxNotebookPage
Definition: ShuttleGui.h:61
ShuttleGuiBase::UpdateSizersAtStart
void UpdateSizersAtStart()
Definition: ShuttleGui.cpp:2196
ChoiceSetting::Key
const wxString & Key() const
Definition: Prefs.h:286
wxPanelWrapper
Definition: wxPanelWrapper.h:41
ShuttleGuiBase::miIdSetByUser
int miIdSetByUser
Definition: ShuttleGui.h:547
ShuttleGuiBase::DoTieCheckBoxOnRight
wxCheckBox * DoTieCheckBoxOnRight(const TranslatableString &Prompt, WrappedType &WrappedRef)
Definition: ShuttleGui.cpp:1295
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1629
ShuttleGuiBase::ApplyItem
static void ApplyItem(int step, const DialogDefinition::Item &item, wxWindow *pWind, wxWindow *pDlg)
Definition: ShuttleGui.cpp:2087
WrappedType::IsString
bool IsString()
Definition: WrappedType.cpp:35
ShuttleGuiBase::mpShuttle
std::unique_ptr< Shuttle > mpShuttle
Definition: ShuttleGui.h:533
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:1687
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:1749
ShuttleGuiBase::pSizerStack
wxSizer * pSizerStack[nMaxNestedSizers]
Definition: ShuttleGui.h:531
ShuttleGuiBase::mRadioValueString
wxString mRadioValueString
The index of this radio item. -1 for none.
Definition: ShuttleGui.h:577
WrappedType::ReadAsBool
bool ReadAsBool()
Definition: WrappedType.cpp:124
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
WrappedType::ReadAsInt
int ReadAsInt()
Definition: WrappedType.cpp:68
ShuttleGuiBase::DoTieTextBox
wxTextCtrl * DoTieTextBox(const TranslatableString &Prompt, WrappedType &WrappedRef, const int nChars)
Definition: ShuttleGui.cpp:1370
ShuttleGuiBase::DoInsertListColumns
void DoInsertListColumns(wxListCtrl *pListCtrl, long listControlStyles, std::initializer_list< const ListControlColumn > columns)
Definition: ShuttleGui.cpp:823
ShuttleGuiBase::mRadioSettingName
wxString mRadioSettingName
Definition: ShuttleGui.h:574
DialogDefinition::Item::mToolTip
TranslatableString mToolTip
Definition: ShuttleGui.h:217
ShuttleGuiBase::miSizerProp
int miSizerProp
Definition: ShuttleGui.h:539
eIsSettingToDialog
@ eIsSettingToDialog
Definition: ShuttleGui.h:40
wxArrayStringEx
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
Definition: wxArrayStringEx.h:18
ShuttleGuiBase::EndPanel
void EndPanel()
Definition: ShuttleGui.cpp:1018
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
Optional::reset
void reset()
Definition: MemoryX.h:221
ShuttleGuiBase::DoTieSlider
wxSlider * DoTieSlider(const TranslatableString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
Definition: ShuttleGui.cpp:1446
ShuttleGuiBase::DoStep
bool DoStep(int iStep)
Definition: ShuttleGui.cpp:1817
ShuttleGuiBase::miPropSetByUser
int miPropSetByUser
Definition: ShuttleGui.h:549
ShuttleGuiBase::AddSpinCtrl
wxSpinCtrl * AddSpinCtrl(const TranslatableString &Prompt, int Value, int Max, int Min)
Definition: ShuttleGui.cpp:616
ShuttleGuiBase::miBorder
int miBorder
Definition: ShuttleGui.h:541
ChoiceSetting
Definition: Prefs.h:270
DialogDefinition::Item::mWindowPositionFlags
int mWindowPositionFlags
Definition: ShuttleGui.h:226
DialogDefinition::Item::mName
TranslatableString mName
Definition: ShuttleGui.h:218
wxTextCtrlWrapper
Definition: wxTextCtrlWrapper.h:23
ShuttleGuiBase::AddNumericTextBox
wxTextCtrl * AddNumericTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:674
ShuttleGuiBase::mpSizer
wxSizer * mpSizer
Definition: ShuttleGui.h:554
DialogDefinition::Item::miStyle
long miStyle
Definition: ShuttleGui.h:223
ShuttleGuiBase::AddTextBox
wxTextCtrl * AddTextBox(const TranslatableString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:638
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
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:546
ShuttleGuiBase::ResetId
void ResetId()
Definition: ShuttleGui.cpp:188
ShuttleGuiBase::miProp
int miProp
Definition: ShuttleGui.h:542
ShuttleGuiBase::UpdateSizers
void UpdateSizers()
Definition: ShuttleGui.cpp:2187
ShuttleGuiBase::UpdateSizersC
void UpdateSizersC()
Definition: ShuttleGui.cpp:2191
ShuttleGuiBase::mpParent
wxWindow * mpParent
Definition: ShuttleGui.h:555
Setting
Class template adds default value, read, and write methods to CachingSetingBase.
Definition: Prefs.h:101
Setting::GetDefault
const T & GetDefault() const
Definition: Prefs.h:120
ShuttleGuiBase::PopSizer
void PopSizer()
Definition: ShuttleGui.cpp:2199
ShuttleGuiBase::PushSizer
void PushSizer()
Definition: ShuttleGui.cpp:2206
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:496
ShuttleGuiBase::mpbOptionalFlag
bool * mpbOptionalFlag
Definition: ShuttleGui.h:551
DialogDefinition::Item::mNameSuffix
TranslatableString mNameSuffix
Definition: ShuttleGui.h:219
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:1759
ChoiceSetting::GetSymbols
const EnumValueSymbols & GetSymbols() const
Definition: Prefs.h:288
ShuttleGuiBase::AddSlider
wxSlider * AddSlider(const TranslatableString &Prompt, int pos, int Max, int Min=0)
Definition: ShuttleGui.cpp:589
ShuttleGuiBase::UpdateSizersCore
void UpdateSizersCore(bool bPrepend, int Flags, bool prompt=false)
Definition: ShuttleGui.cpp:2133
ChoiceSetting::Read
wxString Read() const
Definition: Prefs.cpp:282
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:576
eIsGettingMetadata
@ eIsGettingMetadata
Definition: ShuttleGui.h:41
ShuttleGuiBase::miId
int miId
Definition: ShuttleGui.h:545
ShuttleGuiBase::UseUpId
void UseUpId()
Definition: ShuttleGui.cpp:2064
ShuttleGuiBase::SetProportions
void SetProportions(int Default)
Definition: ShuttleGui.cpp:2075
ChoiceSetting::Default
const EnumValueSymbol & Default() const
Definition: Prefs.cpp:274
ShuttleGuiBase::mShuttleMode
teShuttleMode mShuttleMode
Used in choices to determine which item to use on no match.
Definition: ShuttleGui.h:537
ShuttleGuiBase::mpWind
wxWindow * mpWind
Definition: ShuttleGui.h:556
ShuttleGuiBase::DoTieNumericTextBox
wxTextCtrl * DoTieNumericTextBox(const TranslatableString &Prompt, WrappedType &WrappedRef, const int nChars)
Definition: ShuttleGui.cpp:1408
TranslatableString::StrippedTranslation
wxString StrippedTranslation() const
Definition: TranslatableString.h:201
DialogDefinition::Item::mUseBestSize
bool mUseBestSize
Definition: ShuttleGui.h:232
ShuttleGuiBase::miNoMatchSelector
int miNoMatchSelector
Definition: ShuttleGui.h:535
ComponentInterfaceSymbol::Internal
const wxString & Internal() const
Definition: ComponentInterfaceSymbol.h:55
ShuttleGuiBase::mSizerDepth
int mSizerDepth
Definition: ShuttleGui.h:540
ShuttleGuiBase::DoDataShuttle
void DoDataShuttle(const wxString &Name, WrappedType &WrappedRef)
Definition: ShuttleGui.cpp:1247
ShuttleGuiBase::GetStyle
long GetStyle(long Style)
Definition: ShuttleGui.cpp:2213
ShuttleGuiBase::mItem
DialogDefinition::Item mItem
Definition: ShuttleGui.h:582
WrappedType::WriteToAsString
void WriteToAsString(const wxString &InStr)
Definition: WrappedType.cpp:152
DialogDefinition::Item::mHasMinSize
bool mHasMinSize
Definition: ShuttleGui.h:231
ShuttleGuiBase::mRadioSymbols
std::vector< EnumValueSymbol > mRadioSymbols
Definition: ShuttleGui.h:573
wxStaticBoxWrapper
wxStaticBox wxStaticBoxWrapper
Definition: ShuttleGui.h:104
ShuttleGuiBase::AddPrompt
void AddPrompt(const TranslatableString &Prompt, int wrapWidth=0)
Right aligned text string.
Definition: ShuttleGui.cpp:238
TranslatableString::Translation
wxString Translation() const
Definition: TranslatableString.h:79
ByColumns
ByColumns_t ByColumns
Definition: Prefs.cpp:420
ShuttleGuiBase::DoTieCheckBox
wxCheckBox * DoTieCheckBox(const TranslatableString &Prompt, WrappedType &WrappedRef)
Definition: ShuttleGui.cpp:1259
DialogDefinition::Item::mRootConnections
std::vector< std::pair< wxEventType, wxObjectEventFunction > > mRootConnections
Definition: ShuttleGui.h:221
DialogDefinition::Item::mFocused
bool mFocused
Definition: ShuttleGui.h:234
TranslatableString::Stripped
TranslatableString Stripped(unsigned options=MenuCodes) const
non-mutating, constructs another TranslatableString object
Definition: TranslatableString.h:198
safenew
#define safenew
Definition: MemoryX.h:10
ShuttleGuiBase::mpDlg
wxWindow *const mpDlg
Definition: ShuttleGui.h:530
WrappedType::WriteToAsInt
void WriteToAsInt(const int InInt)
Definition: WrappedType.cpp:181
DialogDefinition::Item::mMinSize
wxSize mMinSize
Definition: ShuttleGui.h:230
ShuttleGuiBase::mpSubSizer
std::unique_ptr< wxSizer > mpSubSizer
Definition: ShuttleGui.h:553
ShuttleGuiBase::TieChoice
wxChoice * TieChoice(const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
Definition: ShuttleGui.cpp:1727
ShuttleGuiBase::DoAddRadioButton
wxRadioButton * DoAddRadioButton(const TranslatableString &Prompt, int style, int selector, int initValue)
Unwrapped string value.
Definition: ShuttleGui.cpp:548
DialogDefinition::Item::mWindowSize
wxSize mWindowSize
Definition: ShuttleGui.h:228
DialogDefinition::Item::mValidatorSetter
std::function< void(wxWindow *) > mValidatorSetter
Definition: ShuttleGui.h:216
BasicUI::Button::Default
@ Default
Like Ok, except maybe minor difference of dialog position.
nMaxNestedSizers
const int nMaxNestedSizers
Definition: ShuttleGui.h:34