Audacity  2.2.0
ShuttleGui Class Reference

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

#include <ShuttleGui.h>

Inheritance diagram for ShuttleGui:
ShuttleGuiBase

Public Member Functions

 ShuttleGui (wxWindow *pParent, teShuttleMode ShuttleMode)
 
 ~ShuttleGui (void)
 
ShuttleGuiId (int id)
 
ShuttleGuiProp (int iProp)
 
GuiWaveTrack * AddGuiWaveTrack (const wxString &Name)
 
AttachableScrollBarAddAttachableScrollBar (long style=wxSB_HORIZONTAL)
 
void AddStandardButtons (long buttons=eOkButton|eCancelButton, wxButton *extra=NULL)
 
wxSizerItem * AddSpace (int width, int height)
 
wxSizerItem * AddSpace (int size)
 
void SetSizeHints (int minX=-1, int minY=-1)
 
void SetSizeHints (const wxArrayString &items)
 
void SetSizeHints (const wxArrayInt &items)
 
teShuttleMode GetMode ()
 
- Public Member Functions inherited from ShuttleGuiBase
 ShuttleGuiBase (wxWindow *pParent, teShuttleMode ShuttleMode)
 
 ~ShuttleGuiBase (void)
 
void Init ()
 
void AddPrompt (const wxString &Prompt)
 Right aligned text string. More...
 
void AddUnits (const wxString &Prompt)
 Left aligned text string. More...
 
void AddTitle (const wxString &Prompt)
 Centred text string. More...
 
wxWindow * AddWindow (wxWindow *pWindow, int Flags=wxALIGN_CENTRE|wxALL)
 
wxSlider * AddSlider (const wxString &Prompt, int pos, int Max, int Min=0)
 
wxSlider * AddVSlider (const wxString &Prompt, int pos, int Max)
 
wxSpinCtrl * AddSpinCtrl (const wxString &Prompt, int Value, int Max, int Min)
 
wxTreeCtrl * AddTree ()
 
wxRadioButton * AddRadioButton (const wxString &Prompt)
 
wxRadioButton * AddRadioButtonToGroup (const wxString &Prompt)
 
wxButton * AddButton (const wxString &Text, int PositionFlags=wxALIGN_CENTRE)
 
wxBitmapButton * AddBitmapButton (const wxBitmap &Bitmap, int PositionFlags=wxALIGN_CENTRE)
 
wxStaticText * AddVariableText (const wxString &Str, bool bCenter=false, int PositionFlags=0)
 
wxTextCtrl * AddTextBox (const wxString &Caption, const wxString &Value, const int nChars)
 
wxTextCtrl * AddNumericTextBox (const wxString &Caption, const wxString &Value, const int nChars)
 
wxTextCtrl * AddTextWindow (const wxString &Value)
 Multiline text box that grows. More...
 
wxListBox * AddListBox (const wxArrayString *pChoices, long style=0)
 
wxListCtrl * AddListControl ()
 
wxListCtrl * AddListControlReportMode ()
 
wxGrid * AddGrid ()
 
wxCheckBox * AddCheckBox (const wxString &Prompt, const wxString &Selected)
 
wxCheckBox * AddCheckBoxOnRight (const wxString &Prompt, const wxString &Selected)
 
wxComboBox * AddCombo (const wxString &Prompt, const wxString &Selected, const wxArrayString *pChoices, long style=0)
 
wxChoice * AddChoice (const wxString &Prompt, const wxString &Selected, const wxArrayString *pChoices)
 
wxMenuBar * AddMenuBar ()
 
wxMenu * AddMenu (const wxString &Title)
 
void AddIcon (wxBitmap *pBmp)
 
void AddIconButton (const wxString &Command, const wxString &Params, wxBitmap *pBmp)
 
void AddFixedText (const wxString &Str, bool bCenter=false)
 
void AddConstTextBox (const wxString &Caption, const wxString &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 EndVerticalLay ()
 
wxScrolledWindow * StartScroller (int iStyle=0)
 
void EndScroller ()
 
wxPanel * StartPanel (int iStyle=0)
 
void EndPanel ()
 
void StartMultiColumn (int nCols, int PositionFlags=wxALIGN_LEFT)
 
void EndMultiColumn ()
 
void StartTwoColumn ()
 
void EndTwoColumn ()
 
void StartThreeColumn ()
 
void EndThreeColumn ()
 
wxStaticBox * StartStatic (const wxString &Str, int iProp=0)
 
void EndStatic ()
 
wxNotebook * StartNotebook ()
 
void EndNotebook ()
 
wxNotebookPageStartNotebookPage (const wxString &Name)
 
void StartNotebookPage (const wxString &Name, wxNotebookPage *pPage)
 
void EndNotebookPage ()
 
wxPanel * StartInvisiblePanel ()
 
void EndInvisiblePanel ()
 
void StartRadioButtonGroup (const wxString &SettingName)
 
void EndRadioButtonGroup ()
 
void StartRadioButtonGroup (const wxString &SettingName, const int iDefaultValue)
 
void StartRadioButtonGroup (const wxString &SettingName, const wxString &DefaultValue)
 
void DoDataShuttle (const wxString &Name, WrappedType &WrappedRef)
 
bool DoStep (int iStep)
 
int TranslateToIndex (const wxString &Value, const wxArrayString &Choices)
 String-to-Index. More...
 
wxString TranslateFromIndex (const int nIn, const wxArrayString &Choices)
 Index-to-String. More...
 
int TranslateToIndex (const int Value, const wxArrayInt &Choices)
 Int-to-Index (choices can be items like e.g 0x400120 ) More...
 
int TranslateFromIndex (const int nIn, const wxArrayInt &Choices)
 Index-to-int (choices can be items like e.g 0x400120 ) More...
 
wxTextCtrl * TieTextBox (const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
 
wxTextCtrl * TieTextBox (const wxString &Caption, wxString &Value, const int nChars=0)
 
wxTextCtrl * TieTextBox (const wxString &Prompt, int &Selected, const int nChars=0)
 
wxTextCtrl * TieTextBox (const wxString &Prompt, double &Value, const int nChars=0)
 
wxTextCtrl * TieNumericTextBox (const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
 
wxTextCtrl * TieNumericTextBox (const wxString &Caption, wxString &Value, const int nChars=0)
 
wxTextCtrl * TieNumericTextBox (const wxString &Prompt, int &Selected, const int nChars=0)
 
wxTextCtrl * TieNumericTextBox (const wxString &Prompt, double &Value, const int nChars=0)
 
wxCheckBox * TieCheckBox (const wxString &Prompt, WrappedType &WrappedRef)
 
wxCheckBox * TieCheckBox (const wxString &Prompt, const wxString &Selected)
 
wxCheckBox * TieCheckBox (const wxString &Prompt, bool &Var)
 
wxCheckBox * TieCheckBoxOnRight (const wxString &Prompt, WrappedType &WrappedRef)
 
wxCheckBox * TieCheckBoxOnRight (const wxString &Prompt, bool &Var)
 
wxChoice * TieChoice (const wxString &Prompt, WrappedType &WrappedRef, const wxArrayString *pChoices)
 
wxChoice * TieChoice (const wxString &Prompt, wxString &Selected, const wxArrayString *pChoices)
 
wxChoice * TieChoice (const wxString &Prompt, int &Selected, const wxArrayString *pChoices)
 
wxSlider * TieSlider (const wxString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
 
wxSlider * TieSlider (const wxString &Prompt, int &pos, const int max, const int min=0)
 
wxSlider * TieSlider (const wxString &Prompt, double &pos, const double max, const double min=0.0)
 
wxSlider * TieSlider (const wxString &Prompt, float &pos, const float fMin, const float fMax)
 
wxSlider * TieVSlider (const wxString &Prompt, float &pos, const float fMin, const float fMax)
 
wxRadioButton * TieRadioButton (const wxString &Prompt, WrappedType &WrappedRef)
 
wxRadioButton * TieRadioButton (const wxString &Prompt, const int iValue)
 This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair. More...
 
wxRadioButton * TieRadioButton (const wxString &Prompt, const wxString &Value)
 This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair. More...
 
wxSpinCtrl * TieSpinCtrl (const wxString &Prompt, WrappedType &WrappedRef, const int max, const int min=0)
 
wxSpinCtrl * TieSpinCtrl (const wxString &Prompt, int &Value, const int max, const int min=0)
 
wxCheckBox * TieCheckBox (const wxString &Prompt, const wxString &SettingName, const bool bDefault)
 
wxCheckBox * TieCheckBoxOnRight (const wxString &Prompt, const wxString &SettingName, const bool bDefault)
 
wxChoice * TieChoice (const wxString &Prompt, const wxString &SettingName, const wxString &Default, const wxArrayString &Choices, const wxArrayString &TranslatedChoices)
 
wxChoice * TieChoice (const wxString &Prompt, const wxString &SettingName, const int Default, const wxArrayString &Choices, const wxArrayInt &TranslatedChoices)
 
wxTextCtrl * TieTextBox (const wxString &Prompt, const wxString &SettingName, const wxString &Default, const int nChars)
 
wxTextCtrl * TieTextBox (const wxString &Prompt, const wxString &SettingName, const double &Default, const int nChars)
 
wxTextCtrl * TieNumericTextBox (const wxString &Prompt, const wxString &SettingName, const wxString &Default, const int nChars)
 
wxTextCtrl * TieNumericTextBox (const wxString &Prompt, const wxString &SettingName, const double &Default, const int nChars)
 
wxSlider * TieSlider (const wxString &Prompt, const wxString &SettingName, const int iDefault, const int max, const int min=0)
 
wxSpinCtrl * TieSpinCtrl (const wxString &Prompt, const wxString &SettingName, const int Value, const int max, const int min)
 
void EnableCtrl (bool bEnable)
 
void SetSizeHints (int minX, int minY)
 Used to modify an already placed Window. More...
 
void SetBorder (int Border)
 
void SetStyle (int Style)
 
void SetNoMatchSelector (int iSelector)
 
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 SetSizeHints (wxWindow *window, const wxArrayString &items)
 
static void SetSizeHints (wxWindow *window, const wxArrayInt &items)
 

Additional Inherited Members

- Protected Member Functions inherited from ShuttleGuiBase
void SetProportions (int Default)
 
void PushSizer ()
 
void PopSizer ()
 
void UpdateSizersCore (bool bPrepend, int Flags)
 
void UpdateSizers ()
 
void UpdateSizersC ()
 
void UpdateSizersAtStart ()
 
long Style (long Style)
 
- Protected Attributes inherited from ShuttleGuiBase
wxWindow * mpLastWind
 
wxWindow * 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...
 
wxString mSettingName
 
int mRadioCount
 The setting controlled by a group. More...
 
WrappedType mRadioValue
 The index of this radio item. -1 for none. More...
 
wxString mRadioValueString
 The wrapped value associated with the active radio button. More...
 
int mRadioValueInt
 Unwrapped string value. More...
 
int miSizerProp
 Unwrapped integer value. More...
 
int mSizerDepth
 
int miBorder
 
long miStyle
 
int miProp
 
int miId
 
int miIdNext
 
int miIdSetByUser
 
int miPropSetByUser
 
std::unique_ptr< wxSizer > mpSubSizer
 
wxSizer * mpSizer
 
wxWindow * mpParent
 
wxWindow * mpWind
 
wxMenuBar * mpMenuBar
 
wxMenu * mpMenu
 

Detailed Description

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

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

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

Most of the ShuttleGui functions are actually defined in ShuttleGuiBase.

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

Constructor & Destructor Documentation

ShuttleGui::~ShuttleGui ( void  )

Member Function Documentation

wxSizerItem* ShuttleGui::AddSpace ( int  size)
inline

References AddSpace().

Referenced by AddSpace().

teShuttleMode ShuttleGui::GetMode ( )
inline
ShuttleGui & ShuttleGui::Id ( int  id)

References ShuttleGuiBase::miIdSetByUser.

Referenced by NyquistEffect::BuildEffectWindow(), NyquistEffect::BuildPromptWindow(), ContrastDialog::ContrastDialog(), EffectPresetsDialog::EffectPresetsDialog(), ExportCL::Export(), FreqWindow::FreqWindow(), HistoryWindow::HistoryWindow(), ImportRawDialog::ImportRawDialog(), BenchmarkDialog::MakeBenchmarkDialog(), BatchProcessDialog::OnApplyToFiles(), AudacityProject::OnAudioDeviceInfo(), SplashDialog::Populate(), DirectoriesPrefs::PopulateOrExchange(), ThemePrefs::PopulateOrExchange(), RecordingPrefs::PopulateOrExchange(), WaveformPrefs::PopulateOrExchange(), LibraryPrefs::PopulateOrExchange(), DevicePrefs::PopulateOrExchange(), QualityPrefs::PopulateOrExchange(), KeyConfigPrefs::PopulateOrExchange(), BatchProcessDialog::PopulateOrExchange(), BatchCommandDialog::PopulateOrExchange(), ExportCLOptions::PopulateOrExchange(), ScreenFrame::PopulateOrExchange(), EffectClickRemoval::PopulateOrExchange(), EffectCompressor::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), EffectDtmf::PopulateOrExchange(), EffectChangeSpeed::PopulateOrExchange(), EffectAmplify::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EditChainsDialog::PopulateOrExchange(), EffectReverb::PopulateOrExchange(), EffectBassTreble::PopulateOrExchange(), TimerRecordDialog::PopulateOrExchange(), EffectWahwah::PopulateOrExchange(), EffectPhaser::PopulateOrExchange(), ExportMultiple::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), ExportPCMOptions::PopulateOrExchange(), ExtImportPrefs::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), TagsEditor::PopulateOrExchange(), DependencyDialog::PopulateOrExchange(), ExportMP3Options::PopulateOrExchange(), EditCurvesDialog::PopulateOrExchange(), EffectNoiseReduction::Dialog::PopulateOrExchange(), PluginRegistrationDialog::PopulateOrExchange(), FindDialog::PopulateOrExchange(), and HelpSystem::ShowHtmlText().

void ShuttleGui::SetSizeHints ( const wxArrayString &  items)
void ShuttleGui::SetSizeHints ( const wxArrayInt &  items)
void ShuttleGui::SetSizeHints ( wxWindow *  window,
const wxArrayString &  items 
)
static
void ShuttleGui::SetSizeHints ( wxWindow *  window,
const wxArrayInt &  items 
)
static

References SetSizeHints().


The documentation for this class was generated from the following files: