![]() |
Audacity 3.2.0
|
Base class for shuttling data to and from a GUI. More...
#include <ShuttleGui.h>
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) |
wxStaticText * | 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) |
ReadOnlyText * | AddReadOnlyText (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, bool acceptEnter=false) |
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 () |
wxNotebookPage * | StartNotebookPage (const TranslatableString &Name) |
void | EndNotebookPage () |
wxPanel * | StartInvisiblePanel (int border=0) |
void | EndInvisiblePanel () |
void | StartRadioButtonGroup (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, bool acceptEnter=false) |
wxTextCtrl * | TieNumericTextBox (const TranslatableString &Prompt, double &Value, const int nChars=0, bool acceptEnter=false) |
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, ChoiceSetting &choiceSetting) |
virtual wxChoice * | TieNumberAsChoice (const TranslatableString &Prompt, 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, bool acceptEnter=false) |
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 () |
ShuttleGuiBase & | Prop (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< ShuttlePrefs > | mpShuttle |
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, bool acceptEnter=false) |
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< EnumValueSymbol > | mRadioSymbols |
wxString | mRadioSettingName |
std::optional< WrappedType > | mRadioValue |
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... | |
Base class for shuttling data to and from a GUI.
see also ShuttleGui
Use the:
Start
/ End
methods for containers, like two-column-layout.Add
methods if you are only interested in creating the controls.Tie
methods if you also want to exchange data using ShuttleGui.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 239 of file ShuttleGui.h.
ShuttleGuiBase::ShuttleGuiBase | ( | wxWindow * | pParent, |
teShuttleMode | ShuttleMode, | ||
bool | vertical, | ||
wxSize | minSize | ||
) |
Definition at line 127 of file ShuttleGui.cpp.
References eIsCreating, Init(), mpbOptionalFlag, mpParent, and mShuttleMode.
|
virtual |
Definition at line 138 of file ShuttleGui.cpp.
wxBitmapButton * ShuttleGuiBase::AddBitmapButton | ( | const wxBitmap & | Bitmap, |
int | PositionFlags = wxALIGN_CENTRE , |
||
bool | setDefault = false |
||
) |
Definition at line 380 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, UpdateSizersCore(), and UseUpId().
wxButton * ShuttleGuiBase::AddButton | ( | const TranslatableString & | Text, |
int | PositionFlags = wxALIGN_CENTRE , |
||
bool | setDefault = false |
||
) |
Definition at line 361 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizersCore(), and UseUpId().
Referenced by cloud::audiocom::ShareAudioDialog::Populate(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and ChangeClipSpeedDialog::PopulateOrExchange().
wxCheckBox * ShuttleGuiBase::AddCheckBox | ( | const TranslatableString & | Prompt, |
bool | Selected | ||
) |
Definition at line 310 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpbOptionalFlag, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UseUpId(), and wxT().
Referenced by DoTieCheckBox().
|
delete |
|
delete |
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 344 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Stripped(), TranslatableString::Translation(), UpdateSizers(), UseUpId(), and wxT().
Referenced by DoTieCheckBoxOnRight(), and TieCheckBoxOnRight().
|
delete |
|
delete |
wxChoice * ShuttleGuiBase::AddChoice | ( | const TranslatableString & | Prompt, |
const TranslatableStrings & | choices, | ||
const TranslatableString & | selected | ||
) |
Definition at line 434 of file ShuttleGui.cpp.
References AddChoice(), and make_iterator_range().
wxChoice * ShuttleGuiBase::AddChoice | ( | const TranslatableString & | Prompt, |
const TranslatableStrings & | choices, | ||
int | Selected = -1 |
||
) |
Definition at line 399 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Stripped(), TranslatableString::StrippedTranslation(), TranslatableString::Translation(), UpdateSizers(), and UseUpId().
Referenced by AddChoice(), and TieChoice().
wxComboBox * ShuttleGuiBase::AddCombo | ( | const TranslatableString & | Prompt, |
const wxString & | Selected, | ||
const wxArrayStringEx & | choices | ||
) |
Definition at line 518 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
void ShuttleGuiBase::AddConstTextBox | ( | const TranslatableString & | Caption, |
const TranslatableString & | Value | ||
) |
Single line text box of fixed size.
Definition at line 738 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
void ShuttleGuiBase::AddFixedText | ( | const TranslatableString & | Str, |
bool | bCenter = false , |
||
int | wrapWidth = 0 |
||
) |
Definition at line 441 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UpdateSizersC(), and UseUpId().
Referenced by cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), ChangeClipSpeedDialog::PopulateOrExchange(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
wxGrid * ShuttleGuiBase::AddGrid | ( | ) |
Definition at line 773 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
void ShuttleGuiBase::AddIcon | ( | wxBitmap * | pBmp | ) |
Definition at line 873 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpWind, mShuttleMode, safenew, UpdateSizersC(), and UseUpId().
wxListBox * ShuttleGuiBase::AddListBox | ( | const wxArrayStringEx & | choices | ) |
Definition at line 758 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
wxListCtrl * ShuttleGuiBase::AddListControl | ( | std::initializer_list< const ListControlColumn > | columns = {} , |
long | listControlStyles = 0 |
||
) |
Definition at line 787 of file ShuttleGui.cpp.
References DoInsertListColumns(), eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
wxListCtrl * ShuttleGuiBase::AddListControlReportMode | ( | std::initializer_list< const ListControlColumn > | columns = {} , |
long | listControlStyles = 0 |
||
) |
Definition at line 807 of file ShuttleGui.cpp.
References DoInsertListColumns(), eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
wxTextCtrl * ShuttleGuiBase::AddNumericTextBox | ( | const TranslatableString & | Caption, |
const wxString & | Value, | ||
const int | nChars, | ||
bool | acceptEnter = false |
||
) |
Definition at line 675 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
Referenced by DoTieNumericTextBox().
wxStaticText * ShuttleGuiBase::AddPrompt | ( | const TranslatableString & | Prompt, |
int | wrapWidth = 0 |
||
) |
Right aligned text string.
Definition at line 237 of file ShuttleGui.cpp.
References eIsCreating, TranslatableString::empty(), GetParent(), GetStyle(), miId, miProp, mpbOptionalFlag, mpDlg, mpWind, mShuttleMode, safenew, TieCheckBox(), TranslatableString::Translation(), and UpdateSizersCore().
Referenced by AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddNumericTextBox(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), and ChangeClipSpeedDialog::PopulateOrExchange().
wxRadioButton * ShuttleGuiBase::AddRadioButton | ( | const TranslatableString & | Prompt, |
int | selector = 0 , |
||
int | initValue = 0 |
||
) |
Definition at line 569 of file ShuttleGui.cpp.
References DoAddRadioButton().
wxRadioButton * ShuttleGuiBase::AddRadioButtonToGroup | ( | const TranslatableString & | Prompt, |
int | selector = 1 , |
||
int | initValue = 0 |
||
) |
Definition at line 575 of file ShuttleGui.cpp.
References DoAddRadioButton().
ReadOnlyText * ShuttleGuiBase::AddReadOnlyText | ( | const TranslatableString & | Caption, |
const wxString & | Value | ||
) |
Definition at line 497 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, DialogDefinition::Item::miStyle, mItem, mpDlg, mpWind, mShuttleMode, safenew, anonymous_namespace{AudacityDontAskAgainMessageDialog.cpp}::style, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
wxSlider * ShuttleGuiBase::AddSlider | ( | const TranslatableString & | Prompt, |
int | pos, | ||
int | Max, | ||
int | Min = 0 |
||
) |
Definition at line 590 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mItem, mpDlg, mpWind, mShuttleMode, DialogDefinition::Item::mWindowSize, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
Referenced by DoTieSlider().
wxSpinCtrl * ShuttleGuiBase::AddSpinCtrl | ( | const TranslatableString & | Prompt, |
int | Value, | ||
int | Max, | ||
int | Min | ||
) |
Definition at line 617 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
Referenced by DoTieSpinCtrl().
wxTextCtrl * ShuttleGuiBase::AddTextBox | ( | const TranslatableString & | Caption, |
const wxString & | Value, | ||
const int | nChars | ||
) |
Definition at line 639 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), GetStyle(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UseUpId(), and wxT().
Referenced by DoTieTextBox(), ErrorReportDialog::ErrorReportDialog(), and cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel().
wxTextCtrl * ShuttleGuiBase::AddTextWindow | ( | const wxString & | Value | ) |
Multiline text box that grows.
Definition at line 717 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
Referenced by ErrorDialog::ErrorDialog().
void ShuttleGuiBase::AddTitle | ( | const TranslatableString & | Prompt, |
int | wrapWidth = 0 |
||
) |
Centred text string.
Definition at line 282 of file ShuttleGui.cpp.
References eIsCreating, TranslatableString::empty(), GetParent(), GetStyle(), mpWind, mShuttleMode, safenew, TranslatableString::Translation(), and UpdateSizers().
wxTreeCtrl * ShuttleGuiBase::AddTree | ( | ) |
Definition at line 859 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
void ShuttleGuiBase::AddUnits | ( | const TranslatableString & | Prompt, |
int | wrapWidth = 0 |
||
) |
Left aligned text string.
Definition at line 264 of file ShuttleGui.cpp.
References eIsCreating, TranslatableString::empty(), GetParent(), GetStyle(), miProp, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), and UpdateSizersCore().
wxStaticText * ShuttleGuiBase::AddVariableText | ( | const TranslatableString & | Str, |
bool | bCenter = false , |
||
int | PositionFlags = 0 , |
||
int | wrapWidth = 0 |
||
) |
Definition at line 464 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UpdateSizersC(), UpdateSizersCore(), and UseUpId().
Referenced by ErrorReportDialog::ErrorReportDialog(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
wxSlider * ShuttleGuiBase::AddVSlider | ( | const TranslatableString & | Prompt, |
int | pos, | ||
int | Max | ||
) |
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 300 of file ShuttleGui.cpp.
References eIsCreating, mpWind, mShuttleMode, SetProportions(), and UpdateSizersCore().
Referenced by cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
|
static |
Definition at line 2092 of file ShuttleGui.cpp.
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().
|
private |
Unwrapped string value.
Definition at line 549 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpWind, mShuttleMode, safenew, anonymous_namespace{AudacityDontAskAgainMessageDialog.cpp}::style, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
Referenced by AddRadioButton(), and AddRadioButtonToGroup().
|
private |
When we're exchanging with the configured shuttle rather than with the GUI We use this function.
Definition at line 1252 of file ShuttleGui.cpp.
References mpShuttle.
Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), TieCheckBox(), TieCheckBoxOnRight(), TieChoice(), TieIntegerTextBox(), TieNumericTextBox(), TieSlider(), TieSpinCtrl(), and TieTextBox().
|
private |
Definition at line 828 of file ShuttleGui.cpp.
References PackedArray::begin(), and anonymous_namespace{AudacityDontAskAgainMessageDialog.cpp}::style.
Referenced by AddListControl(), and AddListControlReportMode().
bool ShuttleGuiBase::DoStep | ( | int | iStep | ) |
Code-Condenser function.
We have functions which need to do:
So we make a list of all the possible steps, and have DoStep choose which ones are actually done, like this:
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 1825 of file ShuttleGui.cpp.
References eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, and mShuttleMode.
Referenced by TieCheckBox(), TieCheckBoxOnRight(), TieChoice(), TieIntegerTextBox(), TieNumericTextBox(), TieSlider(), TieSpinCtrl(), and TieTextBox().
|
private |
Definition at line 1264 of file ShuttleGui.cpp.
References AddCheckBox(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsBool(), WrappedType::ReadAsString(), UseUpId(), WrappedType::WriteToAsBool(), and wxT().
Referenced by TieCheckBox(), and TieCheckBoxOnRight().
|
private |
Definition at line 1300 of file ShuttleGui.cpp.
References AddCheckBoxOnRight(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsBool(), WrappedType::ReadAsString(), UseUpId(), WrappedType::WriteToAsBool(), and wxT().
Referenced by TieCheckBoxOnRight().
|
private |
Definition at line 1413 of file ShuttleGui.cpp.
References AddNumericTextBox(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsString(), UseUpId(), and WrappedType::WriteToAsString().
Referenced by TieIntegerTextBox(), and TieNumericTextBox().
|
private |
Definition at line 1452 of file ShuttleGui.cpp.
References AddSlider(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, min(), mpDlg, mShuttleMode, WrappedType::ReadAsInt(), UseUpId(), and WrappedType::WriteToAsInt().
Referenced by TieSlider().
|
private |
Definition at line 1336 of file ShuttleGui.cpp.
References AddSpinCtrl(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, min(), mpDlg, mShuttleMode, WrappedType::ReadAsInt(), UseUpId(), and WrappedType::WriteToAsInt().
Referenced by TieSpinCtrl().
|
private |
Definition at line 1375 of file ShuttleGui.cpp.
References AddTextBox(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, WrappedType::ReadAsString(), UseUpId(), and WrappedType::WriteToAsString().
Referenced by TieTextBox().
void ShuttleGuiBase::EndHorizontalLay | ( | ) |
Definition at line 1182 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
Referenced by cloud::audiocom::ShareAudioDialog::Populate(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and ChangeClipSpeedDialog::PopulateOrExchange().
void ShuttleGuiBase::EndInvisiblePanel | ( | ) |
Definition at line 1160 of file ShuttleGui.cpp.
References EndPanel().
Referenced by cloud::audiocom::ShareAudioDialog::Populate(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), ChangeClipSpeedDialog::PopulateOrExchange(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::EndMultiColumn | ( | ) |
Definition at line 1243 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
Referenced by ChangeClipSpeedDialog::PopulateOrExchange().
void ShuttleGuiBase::EndNotebook | ( | ) |
Definition at line 1045 of file ShuttleGui.cpp.
References mpParent.
void ShuttleGuiBase::EndNotebookPage | ( | ) |
Definition at line 1096 of file ShuttleGui.cpp.
References eIsCreating, mpParent, mShuttleMode, and PopSizer().
void ShuttleGuiBase::EndPanel | ( | ) |
Definition at line 1023 of file ShuttleGui.cpp.
References eIsCreating, mpParent, mShuttleMode, and PopSizer().
Referenced by EndInvisiblePanel().
void ShuttleGuiBase::EndRadioButtonGroup | ( | ) |
Call this after any TieRadioButton calls. It's generic too. We don't need type-specific ones.
Definition at line 1618 of file ShuttleGui.cpp.
References DoDataShuttle(), eIsGettingFromDialog, mRadioCount, mRadioSettingName, mRadioSymbols, mRadioValue, mShuttleMode, and wxT().
void ShuttleGuiBase::EndScroller | ( | ) |
Definition at line 976 of file ShuttleGui.cpp.
References eIsCreating, mpParent, mpSizer, mShuttleMode, and PopSizer().
void ShuttleGuiBase::EndSimplebook | ( | ) |
Definition at line 1066 of file ShuttleGui.cpp.
References mpParent.
void ShuttleGuiBase::EndStatic | ( | ) |
Definition at line 927 of file ShuttleGui.cpp.
References eIsCreating, mpParent, mShuttleMode, and PopSizer().
|
inline |
Definition at line 367 of file ShuttleGui.h.
|
inline |
Definition at line 365 of file ShuttleGui.h.
void ShuttleGuiBase::EndVerticalLay | ( | ) |
Definition at line 1208 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
Referenced by ShuttleGui::AddStandardButtons(), ErrorReportDialog::ErrorReportDialog(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::EndWrapLay | ( | ) |
Definition at line 1226 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
Referenced by cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
|
noexcept |
Definition at line 195 of file ShuttleGui.cpp.
References miBorder.
|
inline |
Definition at line 495 of file ShuttleGui.h.
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(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel(), StartInvisiblePanel(), StartNotebook(), StartNotebookPage(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), and TieRadioButton().
|
inline |
Definition at line 505 of file ShuttleGui.h.
|
protected |
Definition at line 2218 of file ShuttleGui.cpp.
References DialogDefinition::Item::miStyle, mItem, and anonymous_namespace{AudacityDontAskAgainMessageDialog.cpp}::style.
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().
void ShuttleGuiBase::HandleOptionality | ( | const TranslatableString & | Prompt | ) |
Definition at line 223 of file ShuttleGui.cpp.
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().
void ShuttleGuiBase::Init | ( | bool | vertical, |
wxSize | minSize | ||
) |
Definition at line 142 of file ShuttleGui.cpp.
References eIsCreating, miBorder, miNoMatchSelector, miProp, miPropSetByUser, miSizerProp, mpParent, mpShuttle, mpSizer, mpSubSizer, mpWind, mRadioCount, mRadioSettingName, mShuttleMode, mSizerDepth, PushSizer(), ResetId(), safenew, and wxT().
Referenced by ShuttleGui::ShuttleGui(), and ShuttleGuiBase().
|
protected |
Definition at line 2204 of file ShuttleGui.cpp.
References mpSizer, mSizerDepth, and pSizerStack.
Referenced by ShuttleGui::AddStandardButtons(), EndHorizontalLay(), EndMultiColumn(), EndNotebookPage(), EndPanel(), EndScroller(), EndStatic(), EndVerticalLay(), and EndWrapLay().
ShuttleGuiBase & ShuttleGuiBase::Prop | ( | int | iProp | ) |
Definition at line 887 of file ShuttleGui.cpp.
References miPropSetByUser.
Referenced by ShuttleGui::Prop().
|
protected |
Definition at line 2211 of file ShuttleGui.cpp.
References mpSizer, mSizerDepth, nMaxNestedSizers, and pSizerStack.
Referenced by Init(), StartInvisiblePanel(), StartNotebookPage(), StartPanel(), StartScroller(), and UpdateSizersCore().
void ShuttleGuiBase::ResetId | ( | ) |
Definition at line 187 of file ShuttleGui.cpp.
References miId, miIdNext, and miIdSetByUser.
Referenced by Init().
|
inline |
Definition at line 488 of file ShuttleGui.h.
Referenced by cloud::audiocom::ShareAudioDialog::Populate(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), ChangeClipSpeedDialog::PopulateOrExchange(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
|
protected |
Definition at line 2080 of file ShuttleGui.cpp.
References NumericConverterFormats::Default(), miProp, and miPropSetByUser.
Referenced by AddGrid(), AddListBox(), AddListControl(), AddListControlReportMode(), AddTextWindow(), AddTree(), AddWindow(), StartInvisiblePanel(), StartNotebook(), StartNotebookPage(), StartPanel(), StartScroller(), and StartSimplebook().
|
inline |
Definition at line 490 of file ShuttleGui.h.
void ShuttleGuiBase::SetStretchyCol | ( | int | i | ) |
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition at line 201 of file ShuttleGui.cpp.
References eIsCreating, mpSizer, and mShuttleMode.
void ShuttleGuiBase::SetStretchyRow | ( | int | i | ) |
Used to modify an already placed FlexGridSizer to make a row stretchy.
Definition at line 211 of file ShuttleGui.cpp.
References eIsCreating, mpSizer, and mShuttleMode.
void ShuttleGuiBase::StartHorizontalLay | ( | int | PositionFlags = wxALIGN_CENTRE , |
int | iProp = 1 |
||
) |
Starts a Horizontal Layout.
PositionFlag | Typically wxEXPAND or wxALIGN_CENTER. |
iProp | Proportionality for resizing. |
Definition at line 1172 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().
Referenced by cloud::audiocom::ShareAudioDialog::Populate(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and ChangeClipSpeedDialog::PopulateOrExchange().
wxPanel * ShuttleGuiBase::StartInvisiblePanel | ( | int | border = 0 | ) |
Definition at line 1137 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), miBorder, miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), and UseUpId().
Referenced by cloud::audiocom::ShareAudioDialog::Populate(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), ChangeClipSpeedDialog::PopulateOrExchange(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::StartMultiColumn | ( | int | nCols, |
int | PositionFlags = wxALIGN_LEFT |
||
) |
Definition at line 1234 of file ShuttleGui.cpp.
References eIsCreating, mpSubSizer, mShuttleMode, and UpdateSizersCore().
wxNotebook * ShuttleGuiBase::StartNotebook | ( | ) |
Definition at line 1031 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpParent, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
wxNotebookPage * ShuttleGuiBase::StartNotebookPage | ( | const TranslatableString & | Name | ) |
Definition at line 1073 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), mpParent, mpSizer, mShuttleMode, PushSizer(), safenew, and SetProportions().
wxPanel * ShuttleGuiBase::StartPanel | ( | int | iStyle = 0 | ) |
Definition at line 995 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miBorder, miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), and UseUpId().
void ShuttleGuiBase::StartRadioButtonGroup | ( | ChoiceSetting & | Setting | ) |
Call this before any TieRadioButton calls.
Definition at line 1601 of file ShuttleGui.cpp.
References DoDataShuttle(), eIsCreating, mRadioCount, mRadioSettingName, mRadioSymbols, mRadioValue, mRadioValueString, and mShuttleMode.
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.
istyle | deprecated parameter, but has been used for hacking. |
Definition at line 943 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), UpdateSizersAtStart(), UseUpId(), and wxT().
wxSimplebook * ShuttleGuiBase::StartSimplebook | ( | ) |
Definition at line 1052 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpDlg, mpParent, mpWind, mShuttleMode, safenew, SetProportions(), UpdateSizers(), and UseUpId().
wxStaticBox * ShuttleGuiBase::StartStatic | ( | const TranslatableString & | Str, |
int | iProp = 0 |
||
) |
Starts a static box around a number of controls.
Str | The text of the title for the box. |
iProp | The 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 898 of file ShuttleGui.cpp.
References eIsCreating, TranslatableString::empty(), GetParent(), miId, miSizerProp, mpParent, mpSubSizer, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UseUpId(), and wxT().
|
inline |
Definition at line 366 of file ShuttleGui.h.
|
inline |
Definition at line 364 of file ShuttleGui.h.
void ShuttleGuiBase::StartVerticalLay | ( | int | iProp = 1 | ) |
Definition at line 1189 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizers().
Referenced by ShuttleGui::AddStandardButtons(), ErrorReportDialog::ErrorReportDialog(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), ChangeClipSpeedDialog::PopulateOrExchange(), and cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::StartVerticalLay | ( | int | PositionFlags, |
int | iProp | ||
) |
Definition at line 1198 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().
void ShuttleGuiBase::StartWrapLay | ( | int | PositionFlags = wxEXPAND , |
int | iProp = 0 |
||
) |
Definition at line 1215 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().
Referenced by cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
wxCheckBox * ShuttleGuiBase::TieCheckBox | ( | const TranslatableString & | Prompt, |
bool & | Var | ||
) |
Definition at line 1635 of file ShuttleGui.cpp.
References DoTieCheckBox().
Referenced by AddPrompt(), HandleOptionality(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieCheckBox().
|
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 1850 of file ShuttleGui.cpp.
References DoDataShuttle(), DoStep(), DoTieCheckBox(), Setting< T >::GetDefault(), and SettingBase::GetPath().
wxCheckBox * ShuttleGuiBase::TieCheckBoxOnRight | ( | const TranslatableString & | Prompt, |
bool & | Var | ||
) |
Definition at line 1642 of file ShuttleGui.cpp.
References AddCheckBoxOnRight(), DoTieCheckBox(), eIsCreating, mShuttleMode, WrappedType::ReadAsString(), and wxT().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieCheckBoxOnRight().
|
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 1867 of file ShuttleGui.cpp.
References DoDataShuttle(), DoStep(), DoTieCheckBoxOnRight(), Setting< T >::GetDefault(), and SettingBase::GetPath().
|
virtual |
Variant of the standard TieChoice which does the two step exchange between gui and stack variable and stack variable and shuttle.
Prompt | The prompt shown beside the control. |
Setting | Encapsulates 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 1979 of file ShuttleGui.cpp.
References ChoiceSetting::Default(), NumericConverterFormats::Default(), DoDataShuttle(), DoStep(), ChoiceSetting::GetSymbols(), ComponentInterfaceSymbol::Internal(), ChoiceSetting::Key(), ChoiceSetting::Read(), TieChoice(), TranslateFromIndex(), TranslateToIndex(), and ChoiceSetting::Write().
wxChoice * ShuttleGuiBase::TieChoice | ( | const TranslatableString & | Prompt, |
int & | Selected, | ||
const TranslatableStrings & | choices | ||
) |
Definition at line 1495 of file ShuttleGui.cpp.
References AddChoice(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, HandleOptionality(), miId, mpDlg, mShuttleMode, ShuttleGui::SetMinSize(), and UseUpId().
wxChoice * ShuttleGuiBase::TieChoice | ( | const TranslatableString & | Prompt, |
TranslatableString & | Selected, | ||
const TranslatableStrings & | choices | ||
) |
Definition at line 1735 of file ShuttleGui.cpp.
References make_iterator_range(), and TieChoice().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieChoice(), TieChoice(), and TieNumberAsChoice().
|
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 integer values...
Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.
Definition at line 1940 of file ShuttleGui.cpp.
References DoDataShuttle(), DoStep(), DoTieNumericTextBox(), Setting< T >::GetDefault(), and SettingBase::GetPath().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieIntegerTextBox().
|
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.
Prompt | The prompt shown beside the control. |
SettingName | The setting name as stored in gPrefs |
Default | The default integer value for this control |
Choices | An array of choices that appear on screen. |
pInternalChoices | The corresponding values (as an integer array) if null, then use 0, 1, 2, ... |
Reimplemented in anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition.
Definition at line 2018 of file ShuttleGui.cpp.
References ByColumns, NumericConverterFormats::Default(), fn, Setting< T >::GetDefault(), make_iterator_range(), miNoMatchSelector, and TieChoice().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieNumberAsChoice().
|
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 1958 of file ShuttleGui.cpp.
References DoDataShuttle(), DoStep(), DoTieNumericTextBox(), Setting< T >::GetDefault(), and SettingBase::GetPath().
wxTextCtrl * ShuttleGuiBase::TieNumericTextBox | ( | const TranslatableString & | Prompt, |
double & | Value, | ||
const int | nChars = 0 , |
||
bool | acceptEnter = false |
||
) |
Definition at line 1687 of file ShuttleGui.cpp.
References DoTieNumericTextBox().
wxTextCtrl * ShuttleGuiBase::TieNumericTextBox | ( | const TranslatableString & | Prompt, |
int & | Value, | ||
const int | nChars = 0 , |
||
bool | acceptEnter = false |
||
) |
Definition at line 1679 of file ShuttleGui.cpp.
References DoTieNumericTextBox().
Referenced by ChangeClipSpeedDialog::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieNumericTextBox().
wxRadioButton * ShuttleGuiBase::TieRadioButton | ( | ) |
This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair.
Definition at line 1542 of file ShuttleGui.cpp.
References eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, GetParent(), ComponentInterfaceSymbol::Internal(), WrappedType::IsString(), miId, mpDlg, mpWind, mRadioCount, mRadioSymbols, mRadioValue, mShuttleMode, WrappedType::ReadAsString(), safenew, ComponentInterfaceSymbol::Translation(), UpdateSizers(), and UseUpId().
|
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 1884 of file ShuttleGui.cpp.
References DoDataShuttle(), DoStep(), DoTieSlider(), Setting< T >::GetDefault(), SettingBase::GetPath(), and min().
wxSlider * ShuttleGuiBase::TieSlider | ( | const TranslatableString & | Prompt, |
double & | pos, | ||
const double | max, | ||
const double | min = 0.0 |
||
) |
Definition at line 1702 of file ShuttleGui.cpp.
References DoTieSlider(), and min().
wxSlider * ShuttleGuiBase::TieSlider | ( | const TranslatableString & | Prompt, |
float & | pos, | ||
const float | fMin, | ||
const float | fMax | ||
) |
Definition at line 1710 of file ShuttleGui.cpp.
References TieSlider().
wxSlider * ShuttleGuiBase::TieSlider | ( | const TranslatableString & | Prompt, |
int & | pos, | ||
const int | max, | ||
const int | min = 0 |
||
) |
Definition at line 1695 of file ShuttleGui.cpp.
References DoTieSlider(), and min().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSlider(), TieSlider(), and TieVSlider().
|
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 1903 of file ShuttleGui.cpp.
References DoDataShuttle(), DoStep(), DoTieSpinCtrl(), Setting< T >::GetDefault(), SettingBase::GetPath(), and min().
wxSpinCtrl * ShuttleGuiBase::TieSpinCtrl | ( | const TranslatableString & | Prompt, |
int & | Value, | ||
const int | max, | ||
const int | min = 0 |
||
) |
Definition at line 1651 of file ShuttleGui.cpp.
References DoTieSpinCtrl(), and min().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSpinCtrl().
wxTextCtrl * ShuttleGuiBase::TieTextBox | ( | const TranslatableString & | Caption, |
wxString & | Value, | ||
const int | nChars = 0 |
||
) |
Definition at line 1658 of file ShuttleGui.cpp.
References DoTieTextBox().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieTextBox().
|
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 1922 of file ShuttleGui.cpp.
References DoDataShuttle(), DoStep(), DoTieTextBox(), Setting< T >::GetDefault(), and SettingBase::GetPath().
wxTextCtrl * ShuttleGuiBase::TieTextBox | ( | const TranslatableString & | Prompt, |
double & | Value, | ||
const int | nChars = 0 |
||
) |
Definition at line 1672 of file ShuttleGui.cpp.
References DoTieTextBox().
wxTextCtrl * ShuttleGuiBase::TieTextBox | ( | const TranslatableString & | Prompt, |
int & | Selected, | ||
const int | nChars = 0 |
||
) |
Definition at line 1665 of file ShuttleGui.cpp.
References DoTieTextBox().
wxSlider * ShuttleGuiBase::TieVSlider | ( | const TranslatableString & | Prompt, |
float & | pos, | ||
const float | fMin, | ||
const float | fMax | ||
) |
Definition at line 1721 of file ShuttleGui.cpp.
References TieSlider().
wxString ShuttleGuiBase::TranslateFromIndex | ( | const int | nIn, |
const wxArrayStringEx & | Choices | ||
) |
Index-to-String.
Definition at line 1767 of file ShuttleGui.cpp.
References miNoMatchSelector, and wxT().
Referenced by TieChoice().
int ShuttleGuiBase::TranslateToIndex | ( | const wxString & | Value, |
const wxArrayStringEx & | Choices | ||
) |
String-to-Index.
Definition at line 1757 of file ShuttleGui.cpp.
References make_iterator_range(), and miNoMatchSelector.
Referenced by TieChoice().
|
protected |
Definition at line 2192 of file ShuttleGui.cpp.
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().
|
protected |
Definition at line 2201 of file ShuttleGui.cpp.
References UpdateSizersCore().
Referenced by StartScroller().
|
protected |
Definition at line 2196 of file ShuttleGui.cpp.
References UpdateSizersCore().
Referenced by AddFixedText(), AddIcon(), and AddVariableText().
|
protected |
Definition at line 2138 of file ShuttleGui.cpp.
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().
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 2069 of file ShuttleGui.cpp.
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().
|
protected |
Definition at line 540 of file ShuttleGui.h.
Referenced by GetBorder(), Init(), StartInvisiblePanel(), StartPanel(), and UpdateSizersCore().
|
protected |
Definition at line 544 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTree(), AddVariableText(), DoAddRadioButton(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinCtrl(), DoTieTextBox(), ResetId(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), TieChoice(), TieRadioButton(), and UseUpId().
|
protected |
Definition at line 545 of file ShuttleGui.h.
|
protected |
Definition at line 546 of file ShuttleGui.h.
Referenced by ShuttleGui::Id(), ResetId(), and UseUpId().
|
protected |
Controls source/destination of shuttled data. You can leave this NULL if you are shuttling to variables
Definition at line 534 of file ShuttleGui.h.
Referenced by Init(), TieNumberAsChoice(), TranslateFromIndex(), and TranslateToIndex().
|
protected |
Definition at line 541 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), AddUnits(), AddVariableText(), Init(), SetProportions(), and UpdateSizersCore().
|
protected |
Definition at line 548 of file ShuttleGui.h.
Referenced by Init(), Prop(), and SetProportions().
|
protected |
Definition at line 538 of file ShuttleGui.h.
Referenced by ShuttleGui::AddStandardButtons(), Init(), StartHorizontalLay(), StartStatic(), StartVerticalLay(), StartWrapLay(), and UpdateSizersCore().
|
protected |
Definition at line 582 of file ShuttleGui.h.
Referenced by AddReadOnlyText(), AddSlider(), GetStyle(), and UpdateSizersCore().
|
protected |
Definition at line 550 of file ShuttleGui.h.
Referenced by AddCheckBox(), AddPrompt(), HandleOptionality(), ShuttleGui::Optional(), and ShuttleGuiBase().
|
protected |
Definition at line 529 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddGrid(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTree(), AddVariableText(), DoAddRadioButton(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinCtrl(), DoTieTextBox(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), TieChoice(), TieRadioButton(), and UpdateSizersCore().
|
protected |
Definition at line 554 of file ShuttleGui.h.
Referenced by ShuttleGui::AddStandardButtons(), EndNotebook(), EndNotebookPage(), EndPanel(), EndScroller(), EndSimplebook(), EndStatic(), Init(), ShuttleGuiBase(), StartInvisiblePanel(), StartNotebook(), StartNotebookPage(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), and UpdateSizersCore().
|
protected |
Definition at line 532 of file ShuttleGui.h.
Referenced by DoDataShuttle(), Init(), and ShuttleGui::ShuttleGui().
|
protected |
Definition at line 553 of file ShuttleGui.h.
Referenced by ShuttleGui::AddSpace(), EndScroller(), Init(), PopSizer(), PushSizer(), SetStretchyCol(), SetStretchyRow(), StartInvisiblePanel(), StartNotebookPage(), StartPanel(), StartScroller(), and UpdateSizersCore().
|
protected |
Definition at line 552 of file ShuttleGui.h.
Referenced by ShuttleGui::AddStandardButtons(), Init(), StartHorizontalLay(), StartMultiColumn(), StartStatic(), StartVerticalLay(), StartWrapLay(), and UpdateSizersCore().
|
protected |
Definition at line 555 of file ShuttleGui.h.
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(), AddWindow(), DoAddRadioButton(), Init(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), TieRadioButton(), and UpdateSizersCore().
|
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().
|
private |
Definition at line 574 of file ShuttleGui.h.
Referenced by EndRadioButtonGroup(), Init(), and StartRadioButtonGroup().
|
private |
Definition at line 573 of file ShuttleGui.h.
Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), and TieRadioButton().
|
private |
The setting controlled by a group.
Definition at line 575 of file ShuttleGui.h.
Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), and TieRadioButton().
|
private |
The index of this radio item. -1 for none.
Definition at line 577 of file ShuttleGui.h.
Referenced by StartRadioButtonGroup().
|
protected |
Used in choices to determine which item to use on no match.
Definition at line 536 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), ShuttleGui::AddSpace(), AddSpinCtrl(), ShuttleGui::AddStandardButtons(), AddTextBox(), AddTextWindow(), AddTitle(), AddTree(), AddUnits(), AddVariableText(), AddWindow(), DoAddRadioButton(), DoStep(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinCtrl(), DoTieTextBox(), EndHorizontalLay(), EndMultiColumn(), EndNotebookPage(), EndPanel(), EndRadioButtonGroup(), EndScroller(), EndStatic(), EndVerticalLay(), EndWrapLay(), HandleOptionality(), Init(), SetStretchyCol(), SetStretchyRow(), ShuttleGui::ShuttleGui(), ShuttleGuiBase(), StartHorizontalLay(), StartInvisiblePanel(), StartMultiColumn(), StartNotebook(), StartNotebookPage(), StartPanel(), StartRadioButtonGroup(), StartScroller(), StartSimplebook(), StartStatic(), StartVerticalLay(), StartWrapLay(), TieCheckBoxOnRight(), TieChoice(), and TieRadioButton().
|
protected |
Definition at line 539 of file ShuttleGui.h.
Referenced by Init(), PopSizer(), and PushSizer().
|
protected |
Definition at line 530 of file ShuttleGui.h.
Referenced by PopSizer(), and PushSizer().