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) |
SpinControl * | AddSpinControl (const wxSize &size, const TranslatableString &Prompt, double Value, double Max, double 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) |
SpinControl * | TieSpinControl (const wxSize &size, const TranslatableString &Prompt, double &Value, const double max, const double 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) |
SpinControl * | DoTieSpinControl (const wxSize &size, const TranslatableString &Prompt, WrappedType &WrappedRef, const double max, const double 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 240 of file ShuttleGui.h.
ShuttleGuiBase::ShuttleGuiBase | ( | wxWindow * | pParent, |
teShuttleMode | ShuttleMode, | ||
bool | vertical, | ||
wxSize | minSize | ||
) |
Definition at line 128 of file ShuttleGui.cpp.
References eIsCreating, Init(), mpbOptionalFlag, mpParent, and mShuttleMode.
|
virtual |
Definition at line 139 of file ShuttleGui.cpp.
wxBitmapButton * ShuttleGuiBase::AddBitmapButton | ( | const wxBitmap & | Bitmap, |
int | PositionFlags = wxALIGN_CENTRE , |
||
bool | setDefault = false |
||
) |
Definition at line 381 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 362 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizersCore(), and UseUpId().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::Populate().
wxCheckBox * ShuttleGuiBase::AddCheckBox | ( | const TranslatableString & | Prompt, |
bool | Selected | ||
) |
Definition at line 311 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 345 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 435 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 400 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 519 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 758 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 442 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, miProp, mpWind, mShuttleMode, safenew, TranslatableString::Translation(), UpdateSizers(), UpdateSizersC(), and UseUpId().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
wxGrid * ShuttleGuiBase::AddGrid | ( | ) |
Definition at line 793 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 893 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), GetStyle(), miId, mpWind, mShuttleMode, safenew, UpdateSizersC(), and UseUpId().
wxListBox * ShuttleGuiBase::AddListBox | ( | const wxArrayStringEx & | choices | ) |
Definition at line 778 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 807 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 827 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 695 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 238 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(), AddSpinControl(), AddSpinCtrl(), and AddTextBox().
wxRadioButton * ShuttleGuiBase::AddRadioButton | ( | const TranslatableString & | Prompt, |
int | selector = 0 , |
||
int | initValue = 0 |
||
) |
Definition at line 570 of file ShuttleGui.cpp.
References DoAddRadioButton().
wxRadioButton * ShuttleGuiBase::AddRadioButtonToGroup | ( | const TranslatableString & | Prompt, |
int | selector = 1 , |
||
int | initValue = 0 |
||
) |
Definition at line 576 of file ShuttleGui.cpp.
References DoAddRadioButton().
ReadOnlyText * ShuttleGuiBase::AddReadOnlyText | ( | const TranslatableString & | Caption, |
const wxString & | Value | ||
) |
Definition at line 498 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 591 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().
SpinControl * ShuttleGuiBase::AddSpinControl | ( | const wxSize & | size, |
const TranslatableString & | Prompt, | ||
double | Value, | ||
double | Max, | ||
double | Min | ||
) |
Definition at line 640 of file ShuttleGui.cpp.
References AddPrompt(), eIsCreating, GetParent(), HandleOptionality(), miId, miProp, mpDlg, mpWind, mShuttleMode, safenew, size, TranslatableString::Translation(), UpdateSizers(), and UseUpId().
Referenced by DoTieSpinControl().
wxSpinCtrl * ShuttleGuiBase::AddSpinCtrl | ( | const TranslatableString & | Prompt, |
int | Value, | ||
int | Max, | ||
int | Min | ||
) |
Definition at line 618 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 659 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 audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel().
wxTextCtrl * ShuttleGuiBase::AddTextWindow | ( | const wxString & | Value | ) |
Multiline text box that grows.
Definition at line 737 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 283 of file ShuttleGui.cpp.
References eIsCreating, TranslatableString::empty(), GetParent(), GetStyle(), mpWind, mShuttleMode, safenew, TranslatableString::Translation(), and UpdateSizers().
wxTreeCtrl * ShuttleGuiBase::AddTree | ( | ) |
Definition at line 879 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 265 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 465 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(), and audacity::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 301 of file ShuttleGui.cpp.
References eIsCreating, mpWind, mShuttleMode, SetProportions(), and UpdateSizersCore().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
|
static |
Definition at line 2158 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 550 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 1271 of file ShuttleGui.cpp.
References mpShuttle.
Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), TieCheckBox(), TieCheckBoxOnRight(), TieChoice(), TieIntegerTextBox(), TieNumericTextBox(), TieSlider(), TieSpinCtrl(), and TieTextBox().
|
private |
Definition at line 848 of file ShuttleGui.cpp.
References details::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 1891 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 1283 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 1319 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 1471 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 1510 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 1394 of file ShuttleGui.cpp.
References AddSpinControl(), eIsCreating, eIsGettingFromDialog, eIsGettingMetadata, eIsSettingToDialog, SpinControl::GetValue(), HandleOptionality(), miId, min(), mpDlg, mShuttleMode, WrappedType::ReadAsDouble(), SpinControl::SetValue(), size, UseUpId(), and WrappedType::WriteToAsDouble().
Referenced by TieSpinControl().
|
private |
Definition at line 1355 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 1433 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 1201 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::Populate(), and audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel().
void ShuttleGuiBase::EndInvisiblePanel | ( | ) |
Definition at line 1179 of file ShuttleGui.cpp.
References EndPanel().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::Populate(), audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::EndMultiColumn | ( | ) |
Definition at line 1262 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
void ShuttleGuiBase::EndNotebook | ( | ) |
Definition at line 1064 of file ShuttleGui.cpp.
References mpParent.
void ShuttleGuiBase::EndNotebookPage | ( | ) |
Definition at line 1115 of file ShuttleGui.cpp.
References eIsCreating, mpParent, mShuttleMode, and PopSizer().
void ShuttleGuiBase::EndPanel | ( | ) |
Definition at line 1042 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 1676 of file ShuttleGui.cpp.
References DoDataShuttle(), eIsGettingFromDialog, mRadioCount, mRadioSettingName, mRadioSymbols, mRadioValue, mShuttleMode, and wxT().
void ShuttleGuiBase::EndScroller | ( | ) |
Definition at line 995 of file ShuttleGui.cpp.
References eIsCreating, mpParent, mpSizer, mShuttleMode, and PopSizer().
void ShuttleGuiBase::EndSimplebook | ( | ) |
Definition at line 1085 of file ShuttleGui.cpp.
References mpParent.
void ShuttleGuiBase::EndStatic | ( | ) |
Definition at line 947 of file ShuttleGui.cpp.
References eIsCreating, mpParent, mShuttleMode, and PopSizer().
|
inline |
Definition at line 371 of file ShuttleGui.h.
|
inline |
Definition at line 369 of file ShuttleGui.h.
void ShuttleGuiBase::EndVerticalLay | ( | ) |
Definition at line 1227 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
Referenced by ShuttleGui::AddStandardButtons(), ErrorReportDialog::ErrorReportDialog(), audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::EndWrapLay | ( | ) |
Definition at line 1245 of file ShuttleGui.cpp.
References eIsCreating, mShuttleMode, and PopSizer().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
|
noexcept |
Definition at line 196 of file ShuttleGui.cpp.
References miBorder.
|
inline |
Definition at line 502 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinControl(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTitle(), AddTree(), AddUnits(), AddVariableText(), DoAddRadioButton(), audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel(), StartInvisiblePanel(), StartNotebook(), StartNotebookPage(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), and TieRadioButton().
|
inline |
Definition at line 512 of file ShuttleGui.h.
|
protected |
Definition at line 2284 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(), and StartSimplebook().
void ShuttleGuiBase::HandleOptionality | ( | const TranslatableString & | Prompt | ) |
Definition at line 224 of file ShuttleGui.cpp.
References eIsCreating, mpbOptionalFlag, mShuttleMode, and TieCheckBox().
Referenced by AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddNumericTextBox(), AddReadOnlyText(), AddSlider(), AddSpinControl(), AddSpinCtrl(), AddTextBox(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinControl(), DoTieSpinCtrl(), DoTieTextBox(), and TieChoice().
void ShuttleGuiBase::Init | ( | bool | vertical, |
wxSize | minSize | ||
) |
Definition at line 143 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 2270 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 907 of file ShuttleGui.cpp.
References miPropSetByUser.
Referenced by ShuttleGui::Prop().
|
protected |
Definition at line 2277 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 188 of file ShuttleGui.cpp.
References miId, miIdNext, and miIdSetByUser.
Referenced by Init().
|
inline |
Definition at line 495 of file ShuttleGui.h.
Referenced by audacity::cloud::audiocom::ShareAudioDialog::Populate(), audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), PitchAndSpeedDialog::PopulateOrExchange(), and audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
|
protected |
Definition at line 2146 of file ShuttleGui.cpp.
References Default, miProp, and miPropSetByUser.
Referenced by AddGrid(), AddListBox(), AddListControl(), AddListControlReportMode(), AddTextWindow(), AddTree(), AddWindow(), StartInvisiblePanel(), StartNotebook(), StartNotebookPage(), StartPanel(), StartScroller(), and StartSimplebook().
|
inline |
Definition at line 497 of file ShuttleGui.h.
void ShuttleGuiBase::SetStretchyCol | ( | int | i | ) |
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition at line 202 of file ShuttleGui.cpp.
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 212 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 1191 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::Populate(), and audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel().
wxPanel * ShuttleGuiBase::StartInvisiblePanel | ( | int | border = 0 | ) |
Definition at line 1156 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), miBorder, miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), and UseUpId().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::Populate(), audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::StartMultiColumn | ( | int | nCols, |
int | PositionFlags = wxALIGN_LEFT |
||
) |
Definition at line 1253 of file ShuttleGui.cpp.
References eIsCreating, mpSubSizer, mShuttleMode, and UpdateSizersCore().
wxNotebook * ShuttleGuiBase::StartNotebook | ( | ) |
Definition at line 1050 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 1092 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), mpParent, mpSizer, mShuttleMode, PushSizer(), safenew, and SetProportions().
wxPanel * ShuttleGuiBase::StartPanel | ( | int | iStyle = 0 | ) |
Definition at line 1014 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 1659 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 963 of file ShuttleGui.cpp.
References eIsCreating, GetParent(), miId, mpDlg, mpParent, mpSizer, mpWind, mShuttleMode, PushSizer(), safenew, SetProportions(), UpdateSizers(), UpdateSizersAtStart(), UseUpId(), and wxT().
wxSimplebook * ShuttleGuiBase::StartSimplebook | ( | ) |
Definition at line 1071 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 918 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 370 of file ShuttleGui.h.
|
inline |
Definition at line 368 of file ShuttleGui.h.
void ShuttleGuiBase::StartVerticalLay | ( | int | iProp = 1 | ) |
Definition at line 1208 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizers().
Referenced by ShuttleGui::AddStandardButtons(), ErrorReportDialog::ErrorReportDialog(), audacity::cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel(), and audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
void ShuttleGuiBase::StartVerticalLay | ( | int | PositionFlags, |
int | iProp | ||
) |
Definition at line 1217 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().
void ShuttleGuiBase::StartWrapLay | ( | int | PositionFlags = wxEXPAND , |
int | iProp = 0 |
||
) |
Definition at line 1234 of file ShuttleGui.cpp.
References eIsCreating, miSizerProp, mpSubSizer, mShuttleMode, and UpdateSizersCore().
Referenced by audacity::cloud::audiocom::ShareAudioDialog::ProgressPanel::PopulateProgressPanel().
wxCheckBox * ShuttleGuiBase::TieCheckBox | ( | const TranslatableString & | Prompt, |
bool & | Var | ||
) |
Definition at line 1693 of file ShuttleGui.cpp.
References DoTieCheckBox().
Referenced by AddPrompt(), HandleOptionality(), PitchAndSpeedDialog::PopulateOrExchange(), 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 1916 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 1700 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 1933 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 2045 of file ShuttleGui.cpp.
References ChoiceSetting::Default(), 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 1553 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 1801 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 2006 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 2084 of file ShuttleGui.cpp.
References ByColumns, 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 2024 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 1753 of file ShuttleGui.cpp.
References DoTieNumericTextBox().
wxTextCtrl * ShuttleGuiBase::TieNumericTextBox | ( | const TranslatableString & | Prompt, |
int & | Value, | ||
const int | nChars = 0 , |
||
bool | acceptEnter = false |
||
) |
Definition at line 1745 of file ShuttleGui.cpp.
References DoTieNumericTextBox().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieNumericTextBox().
wxRadioButton * ShuttleGuiBase::TieRadioButton | ( | ) |
This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair.
Definition at line 1600 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 1950 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 1768 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 1776 of file ShuttleGui.cpp.
References TieSlider().
wxSlider * ShuttleGuiBase::TieSlider | ( | const TranslatableString & | Prompt, |
int & | pos, | ||
const int | max, | ||
const int | min = 0 |
||
) |
Definition at line 1761 of file ShuttleGui.cpp.
References DoTieSlider(), and min().
Referenced by anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSlider(), TieSlider(), and TieVSlider().
SpinControl * ShuttleGuiBase::TieSpinControl | ( | const wxSize & | size, |
const TranslatableString & | Prompt, | ||
double & | Value, | ||
const double | max, | ||
const double | min = 0 |
||
) |
Definition at line 1716 of file ShuttleGui.cpp.
References DoTieSpinControl(), min(), and size.
Referenced by PitchAndSpeedDialog::PopulateOrExchange().
|
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 1969 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 1709 of file ShuttleGui.cpp.
References DoTieSpinCtrl(), and min().
Referenced by PitchAndSpeedDialog::PopulateOrExchange(), and anonymous_namespace{GetInfoCommand.cpp}::ShuttleGuiGetDefinition::TieSpinCtrl().
wxTextCtrl * ShuttleGuiBase::TieTextBox | ( | const TranslatableString & | Caption, |
wxString & | Value, | ||
const int | nChars = 0 |
||
) |
Definition at line 1724 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 1988 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 1738 of file ShuttleGui.cpp.
References DoTieTextBox().
wxTextCtrl * ShuttleGuiBase::TieTextBox | ( | const TranslatableString & | Prompt, |
int & | Selected, | ||
const int | nChars = 0 |
||
) |
Definition at line 1731 of file ShuttleGui.cpp.
References DoTieTextBox().
wxSlider * ShuttleGuiBase::TieVSlider | ( | const TranslatableString & | Prompt, |
float & | pos, | ||
const float | fMin, | ||
const float | fMax | ||
) |
Definition at line 1787 of file ShuttleGui.cpp.
References TieSlider().
wxString ShuttleGuiBase::TranslateFromIndex | ( | const int | nIn, |
const wxArrayStringEx & | Choices | ||
) |
Index-to-String.
Definition at line 1833 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 1823 of file ShuttleGui.cpp.
References make_iterator_range(), and miNoMatchSelector.
Referenced by TieChoice().
|
protected |
Definition at line 2258 of file ShuttleGui.cpp.
References UpdateSizersCore().
Referenced by AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddReadOnlyText(), AddSlider(), AddSpinControl(), AddSpinCtrl(), ShuttleGui::AddStandardButtons(), AddTextBox(), AddTextWindow(), AddTitle(), AddTree(), AddVariableText(), DoAddRadioButton(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), StartVerticalLay(), and TieRadioButton().
|
protected |
Definition at line 2267 of file ShuttleGui.cpp.
References UpdateSizersCore().
Referenced by StartScroller().
|
protected |
Definition at line 2262 of file ShuttleGui.cpp.
References UpdateSizersCore().
Referenced by AddFixedText(), AddIcon(), and AddVariableText().
|
protected |
Definition at line 2204 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 2135 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(), AddSpinControl(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTree(), AddVariableText(), DoAddRadioButton(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinControl(), DoTieSpinCtrl(), DoTieTextBox(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), TieChoice(), and TieRadioButton().
|
protected |
Definition at line 547 of file ShuttleGui.h.
Referenced by GetBorder(), Init(), StartInvisiblePanel(), StartPanel(), and UpdateSizersCore().
|
protected |
Definition at line 551 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinControl(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTree(), AddVariableText(), DoAddRadioButton(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinControl(), DoTieSpinCtrl(), DoTieTextBox(), ResetId(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), StartStatic(), TieChoice(), TieRadioButton(), and UseUpId().
|
protected |
Definition at line 552 of file ShuttleGui.h.
|
protected |
Definition at line 553 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 541 of file ShuttleGui.h.
Referenced by Init(), TieNumberAsChoice(), TranslateFromIndex(), and TranslateToIndex().
|
protected |
Definition at line 548 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinControl(), AddSpinCtrl(), AddTextBox(), AddUnits(), AddVariableText(), Init(), SetProportions(), and UpdateSizersCore().
|
protected |
Definition at line 555 of file ShuttleGui.h.
Referenced by Init(), Prop(), and SetProportions().
|
protected |
Definition at line 545 of file ShuttleGui.h.
Referenced by ShuttleGui::AddStandardButtons(), Init(), StartHorizontalLay(), StartStatic(), StartVerticalLay(), StartWrapLay(), and UpdateSizersCore().
|
protected |
Definition at line 592 of file ShuttleGui.h.
Referenced by AddReadOnlyText(), AddSlider(), GetStyle(), and UpdateSizersCore().
|
protected |
Definition at line 557 of file ShuttleGui.h.
Referenced by AddCheckBox(), AddPrompt(), HandleOptionality(), ShuttleGui::Optional(), and ShuttleGuiBase().
|
protected |
Definition at line 536 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddGrid(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinControl(), AddSpinCtrl(), AddTextBox(), AddTextWindow(), AddTree(), AddVariableText(), DoAddRadioButton(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinControl(), DoTieSpinCtrl(), DoTieTextBox(), StartInvisiblePanel(), StartNotebook(), StartPanel(), StartScroller(), StartSimplebook(), TieChoice(), TieRadioButton(), and UpdateSizersCore().
|
protected |
Definition at line 561 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 539 of file ShuttleGui.h.
Referenced by DoDataShuttle(), Init(), and ShuttleGui::ShuttleGui().
|
protected |
Definition at line 560 of file ShuttleGui.h.
Referenced by ShuttleGui::AddSpace(), EndScroller(), Init(), PopSizer(), PushSizer(), SetStretchyCol(), SetStretchyRow(), StartInvisiblePanel(), StartNotebookPage(), StartPanel(), StartScroller(), and UpdateSizersCore().
|
protected |
Definition at line 559 of file ShuttleGui.h.
Referenced by ShuttleGui::AddStandardButtons(), Init(), StartHorizontalLay(), StartMultiColumn(), StartStatic(), StartVerticalLay(), StartWrapLay(), and UpdateSizersCore().
|
protected |
Definition at line 562 of file ShuttleGui.h.
Referenced by AddBitmapButton(), AddButton(), AddCheckBox(), AddCheckBoxOnRight(), AddChoice(), AddCombo(), AddConstTextBox(), AddFixedText(), AddGrid(), AddIcon(), AddListBox(), AddListControl(), AddListControlReportMode(), AddNumericTextBox(), AddPrompt(), AddReadOnlyText(), AddSlider(), AddSpinControl(), 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 586 of file ShuttleGui.h.
Referenced by EndRadioButtonGroup(), Init(), StartRadioButtonGroup(), and TieRadioButton().
|
private |
Definition at line 584 of file ShuttleGui.h.
Referenced by EndRadioButtonGroup(), Init(), and StartRadioButtonGroup().
|
private |
Definition at line 583 of file ShuttleGui.h.
Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), and TieRadioButton().
|
private |
The setting controlled by a group.
Definition at line 585 of file ShuttleGui.h.
Referenced by EndRadioButtonGroup(), StartRadioButtonGroup(), and TieRadioButton().
|
private |
The index of this radio item. -1 for none.
Definition at line 587 of file ShuttleGui.h.
Referenced by StartRadioButtonGroup().
|
protected |
Used in choices to determine which item to use on no match.
Definition at line 543 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(), AddSpinControl(), AddSpinCtrl(), ShuttleGui::AddStandardButtons(), AddTextBox(), AddTextWindow(), AddTitle(), AddTree(), AddUnits(), AddVariableText(), AddWindow(), DoAddRadioButton(), DoStep(), DoTieCheckBox(), DoTieCheckBoxOnRight(), DoTieNumericTextBox(), DoTieSlider(), DoTieSpinControl(), 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 546 of file ShuttleGui.h.
Referenced by Init(), PopSizer(), and PushSizer().
|
protected |
Definition at line 537 of file ShuttleGui.h.
Referenced by PopSizer(), and PushSizer().