Audacity  3.2.0
Public Member Functions | List of all members
anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition Class Reference

Shuttle that retrieves a JSON format definition of a command's parameters. More...

Inheritance diagram for anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition:
[legend]
Collaboration diagram for anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition:
[legend]

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Shuttle that retrieves a JSON format definition of a command's parameters.

Definition at line 205 of file GetInfoCommand.cpp.

Constructor & Destructor Documentation

◆ ShuttleGuiGetDefinition()

anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::ShuttleGuiGetDefinition ( wxWindow *  pParent,
CommandMessageTarget target 
)

Definition at line 252 of file GetInfoCommand.cpp.

254 : ShuttleGui( pParent, eIsGettingMetadata ),
256 {
257 
258 }

◆ ~ShuttleGuiGetDefinition()

anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::~ShuttleGuiGetDefinition ( void  )
virtual

Definition at line 259 of file GetInfoCommand.cpp.

260 {
261 }

Member Function Documentation

◆ TieCheckBox()

wxCheckBox * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieCheckBox ( const TranslatableString Prompt,
const BoolSetting Setting 
)
overridevirtual

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

Reimplemented from ShuttleGuiBase.

Definition at line 263 of file GetInfoCommand.cpp.

266 {
267  StartStruct();
268  AddItem( Setting.GetPath(), "id" );
269  AddItem( Prompt.Translation(), "prompt" );
270  AddItem( "bool", "type" );
271  AddBool( Setting.GetDefault(), "default" );
272  EndStruct();
273  return ShuttleGui::TieCheckBox( Prompt, Setting );
274 }

References CommandMessageTargetDecorator::AddBool(), CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieCheckBox(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieCheckBoxOnRight()

wxCheckBox * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieCheckBoxOnRight ( const TranslatableString Prompt,
const BoolSetting Setting 
)
overridevirtual

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

Reimplemented from ShuttleGuiBase.

Definition at line 276 of file GetInfoCommand.cpp.

279 {
280  StartStruct();
281  AddItem( Setting.GetPath(), "id" );
282  AddItem( Prompt.Translation(), "prompt" );
283  AddItem( "bool", "type" );
284  AddBool( Setting.GetDefault(), "default" );
285  EndStruct();
286  return ShuttleGui::TieCheckBoxOnRight( Prompt, Setting );
287 }

References CommandMessageTargetDecorator::AddBool(), CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieCheckBoxOnRight(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieChoice()

wxChoice * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieChoice ( const TranslatableString Prompt,
const ChoiceSetting choiceSetting 
)
overridevirtual

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 from ShuttleGuiBase.

Definition at line 289 of file GetInfoCommand.cpp.

292 {
293  StartStruct();
294  AddItem( choiceSetting.Key(), "id" );
295  AddItem( Prompt.Translation(), "prompt" );
296  AddItem( "enum", "type" );
297  AddItem( choiceSetting.Default().Internal(), "default" );
298  StartField( "enum" );
299  StartArray();
300  for ( const auto &choice : choiceSetting.GetSymbols().GetInternals() )
301  AddItem( choice );
302  EndArray();
303  EndField();
304  EndStruct();
305  return ShuttleGui::TieChoice( Prompt, choiceSetting );
306 }

References CommandMessageTargetDecorator::AddItem(), ChoiceSetting::Default(), CommandMessageTargetDecorator::EndArray(), CommandMessageTargetDecorator::EndField(), CommandMessageTargetDecorator::EndStruct(), EnumValueSymbols::GetInternals(), ChoiceSetting::GetSymbols(), ComponentInterfaceSymbol::Internal(), ChoiceSetting::Key(), CommandMessageTargetDecorator::StartArray(), CommandMessageTargetDecorator::StartField(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieChoice(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieIntegerTextBox()

wxTextCtrl * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieIntegerTextBox ( const TranslatableString Prompt,
const IntSetting Setting,
const int  nChars 
)
overridevirtual

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 from ShuttleGuiBase.

Definition at line 341 of file GetInfoCommand.cpp.

345 {
346  StartStruct();
347  AddItem( Setting.GetPath(), "id" );
348  AddItem( Prompt.Translation(), "prompt" );
349  AddItem( "number", "type" );
350  AddItem( Setting.GetDefault(), "default" );
351  EndStruct();
352  return ShuttleGui::TieIntegerTextBox( Prompt, Setting, nChars );
353 }

References CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieIntegerTextBox(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieNumberAsChoice()

wxChoice * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieNumberAsChoice ( const TranslatableString Prompt,
const IntSetting Setting,
const TranslatableStrings Choices,
const std::vector< int > *  pInternalChoices,
int  iNoMatchSelector 
)
overridevirtual

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 from ShuttleGuiBase.

Definition at line 308 of file GetInfoCommand.cpp.

313 {
314  // Come here for controls that present non-exhaustive choices among some
315  // numbers, with an associated control that allows arbitrary entry of an
316  // "Other..."
317  StartStruct();
318  AddItem( Setting.GetPath(), "id" );
319  AddItem( Prompt.Translation(), "prompt" );
320  AddItem( "number", "type" ); // not "enum" !
321  AddItem( Setting.GetDefault(), "default" );
322  EndStruct();
324  Prompt, Setting, Choices, pInternalChoices, iNoMatchSelector );
325 }

References CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieNumberAsChoice(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieNumericTextBox()

wxTextCtrl * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieNumericTextBox ( const TranslatableString Prompt,
const DoubleSetting Setting,
const int  nChars 
)
overridevirtual

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 from ShuttleGuiBase.

Definition at line 355 of file GetInfoCommand.cpp.

359 {
360  StartStruct();
361  AddItem( Setting.GetPath(), "id" );
362  AddItem( Prompt.Translation(), "prompt" );
363  AddItem( "number", "type" );
364  AddItem( Setting.GetDefault(), "default" );
365  EndStruct();
366  return ShuttleGui::TieNumericTextBox( Prompt, Setting, nChars );
367 }

References CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieNumericTextBox(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieSlider()

wxSlider * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSlider ( const TranslatableString Prompt,
const IntSetting Setting,
const int  max,
const int  min = 0 
)
overridevirtual

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

Reimplemented from ShuttleGuiBase.

Definition at line 369 of file GetInfoCommand.cpp.

374 {
375  StartStruct();
376  AddItem( Setting.GetPath(), "id" );
377  AddItem( Prompt.Translation(), "prompt" );
378  AddItem( "number", "type" );
379  AddItem( Setting.GetDefault(), "default" );
380  EndStruct();
381  return ShuttleGui::TieSlider( Prompt, Setting, max, min );
382 }

References CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), min(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieSlider(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieSpinCtrl()

wxSpinCtrl * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSpinCtrl ( const TranslatableString Prompt,
const IntSetting Setting,
const int  max,
const int  min 
)
overridevirtual

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

Reimplemented from ShuttleGuiBase.

Definition at line 384 of file GetInfoCommand.cpp.

389 {
390  StartStruct();
391  AddItem( Setting.GetPath(), "id" );
392  AddItem( Prompt.Translation(), "prompt" );
393  AddItem( "number", "type" );
394  AddItem( Setting.GetDefault(), "default" );
395  EndStruct();
396  return ShuttleGui::TieSpinCtrl( Prompt, Setting, max, min );
397 }

References CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), min(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieSpinCtrl(), and TranslatableString::Translation().

Here is the call graph for this function:

◆ TieTextBox()

wxTextCtrl * anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieTextBox ( const TranslatableString Prompt,
const StringSetting Setting,
const int  nChars 
)
overridevirtual

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

Reimplemented from ShuttleGuiBase.

Definition at line 327 of file GetInfoCommand.cpp.

331 {
332  StartStruct();
333  AddItem( Setting.GetPath(), "id" );
334  AddItem( Prompt.Translation(), "prompt" );
335  AddItem( "string", "type" );
336  AddItem( Setting.GetDefault(), "default" );
337  EndStruct();
338  return ShuttleGui::TieTextBox( Prompt, Setting, nChars );
339 }

References CommandMessageTargetDecorator::AddItem(), CommandMessageTargetDecorator::EndStruct(), Setting< T >::GetDefault(), SettingBase::GetPath(), CommandMessageTargetDecorator::StartStruct(), ShuttleGuiBase::TieTextBox(), and TranslatableString::Translation().

Here is the call graph for this function:

The documentation for this class was generated from the following file:
CommandMessageTargetDecorator::StartField
void StartField(const wxString &name={}) override
Definition: CommandTargets.h:110
SettingBase::GetPath
const wxString & GetPath() const
Definition: Prefs.h:74
ChoiceSetting::Key
const wxString & Key() const
Definition: Prefs.h:285
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1630
CommandMessageTargetDecorator::EndStruct
void EndStruct() override
Definition: CommandTargets.h:103
ShuttleGuiBase::TieSlider
wxSlider * TieSlider(const TranslatableString &Prompt, int &pos, const int max, const int min=0)
Definition: ShuttleGui.cpp:1688
ShuttleGuiBase::TieNumberAsChoice
virtual wxChoice * TieNumberAsChoice(const TranslatableString &Prompt, const IntSetting &Setting, const TranslatableStrings &Choices, const std::vector< int > *pInternalChoices=nullptr, int iNoMatchSelector=0)
Definition: ShuttleGui.cpp:2012
ShuttleGui::ShuttleGui
ShuttleGui(wxWindow *pParent, teShuttleMode ShuttleMode, bool vertical=true, wxSize minSize={ 250, 100 })
Definition: ShuttleGui.cpp:2246
CommandMessageTargetDecorator::AddBool
void AddBool(const bool value, const wxString &name={}) override
Definition: CommandTargets.h:106
CommandMessageTargetDecorator::AddItem
void AddItem(const wxString &value, const wxString &name={}) override
Definition: CommandTargets.h:104
EnumValueSymbols::GetInternals
const wxArrayStringEx & GetInternals() const
Definition: Prefs.cpp:260
ShuttleGuiBase::TieTextBox
wxTextCtrl * TieTextBox(const TranslatableString &Caption, wxString &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1653
CommandMessageTargetDecorator::EndField
void EndField() override
Definition: CommandTargets.h:112
CommandMessageTargetDecorator::EndArray
void EndArray() override
Definition: CommandTargets.h:101
Setting
Class template adds default value, read, and write methods to CachingSetingBase.
Definition: Prefs.h:100
Setting::GetDefault
const T & GetDefault() const
Definition: Prefs.h:119
CommandMessageTargetDecorator::StartArray
void StartArray() override
Definition: CommandTargets.h:100
ShuttleGuiBase::TieNumericTextBox
wxTextCtrl * TieNumericTextBox(const TranslatableString &Prompt, int &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1674
ChoiceSetting::GetSymbols
const EnumValueSymbols & GetSymbols() const
Definition: Prefs.h:287
ShuttleGuiBase::TieSpinCtrl
wxSpinCtrl * TieSpinCtrl(const TranslatableString &Prompt, int &Value, const int max, const int min=0)
Definition: ShuttleGui.cpp:1646
CommandMessageTargetDecorator::StartStruct
void StartStruct() override
Definition: CommandTargets.h:102
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
eIsGettingMetadata
@ eIsGettingMetadata
Definition: ShuttleGui.h:42
ChoiceSetting::Default
const EnumValueSymbol & Default() const
Definition: Prefs.cpp:269
CommandMessageTargetDecorator::CommandMessageTargetDecorator
CommandMessageTargetDecorator(CommandMessageTarget &target)
Definition: CommandTargets.h:97
ShuttleGuiBase::TieIntegerTextBox
virtual wxTextCtrl * TieIntegerTextBox(const TranslatableString &Prompt, const IntSetting &Setting, const int nChars)
Definition: ShuttleGui.cpp:1933
ComponentInterfaceSymbol::Internal
const wxString & Internal() const
Definition: ComponentInterfaceSymbol.h:55
TranslatableString::Translation
wxString Translation() const
Definition: TranslatableString.h:79
ShuttleGuiBase::TieChoice
wxChoice * TieChoice(const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
Definition: ShuttleGui.cpp:1728
ShuttleGuiBase::TieCheckBoxOnRight
wxCheckBox * TieCheckBoxOnRight(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1637