Audacity  3.0.3
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
ShuttleGui.h File Reference
#include "Identifier.h"
#include <vector>
#include <wx/slider.h>
#include "MemoryX.h"
#include <wx/listbase.h>
#include "Prefs.h"
#include "WrappedType.h"
#include "ComponentInterfaceSymbol.h"
#include <wx/defs.h>
Include dependency graph for ShuttleGui.h:

Go to the source code of this file.

Classes

struct  DialogDefinition::Item
 
class  ShuttleGuiBase
 Base class for shuttling data to and from a GUI. More...
 
struct  ShuttleGuiBase::ListControlColumn
 
class  ShuttleGui
 Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI. More...
 

Namespaces

 DialogDefinition
 

Typedefs

typedef wxWindow wxNotebookPage
 
using wxStaticBoxWrapper = wxStaticBox
 
using wxSliderWrapper = wxSlider
 

Enumerations

enum  teShuttleMode {
  eIsCreating, eIsGettingFromDialog, eIsSettingToDialog, eIsGettingMetadata,
  eIsCreatingFromPrefs, eIsSavingToPrefs
}
 
enum  {
  IndicatorSmallWidth = 9, IndicatorMediumWidth = 13, IndicatorOffset = 1, TopMargin = 1,
  BottomMargin = 2, LeftMargin = 1, RightMargin = 1, LoggerID_Save = wxID_HIGHEST + 1,
  LoggerID_Clear, LoggerID_Close, MIDI_MINIMAL_LATENCY_MS = 1, ID_QUIT_AUDACITY = 10000,
  ID_DISCARD_SELECTED, ID_RECOVER_SELECTED, ID_SKIP, ID_FILE_LIST,
  AddButtonID = 10000, RemoveButtonID, RenameButtonID, RestoreButtonID,
  ImportButtonID, ExportButtonID, SaveButtonID, DefaultsButtonID,
  InsertButtonID, EditButtonID, DeleteButtonID, UpButtonID,
  DownButtonID, ApplyToProjectButtonID = ApplyToProjectID, ApplyToFilesButtonID = ApplyToFilesID, RunID = 1000,
  BSaveID, ClearID, StaticTextID, BlockSizeID,
  DataSizeID, NumEditsID, RandSeedID, AU_SAMPLE_FORMAT_16 = 3,
  AU_SAMPLE_FORMAT_24 = 4, AU_SAMPLE_FORMAT_FLOAT = 6, kCommands, kMenus,
  kPreferences, kTracks, kClips, kEnvelopes,
  kLabels, kBoxes, nTypes, kJson,
  kLisp, kBrief, nFormats, FileListID = 6000,
  CopySelectedFilesButtonID, CopyNamesToClipboardID, FutureActionChoiceID, ID_Amp = 10000,
  ID_Peak, ID_Clip, ID_Bass = 10000, ID_Treble,
  ID_Gain, ID_Link, ID_PercentChange = 10000, ID_Multiplier,
  ID_FromVinyl, ID_ToVinyl, ID_ToLength, ID_Thresh = 10000,
  ID_Width, ID_Threshold = 10000, ID_NoiseFloor, ID_Ratio,
  ID_Attack, ID_Decay, ID_BUTTON_USECURRENTF = 10001, ID_BUTTON_USECURRENTB,
  ID_BUTTON_EXPORT, ID_BUTTON_RESET, ID_FOREGROUNDSTART_T, ID_FOREGROUNDEND_T,
  ID_BACKGROUNDSTART_T, ID_BACKGROUNDEND_T, ID_FOREGROUNDDB_TEXT, ID_BACKGROUNDDB_TEXT,
  ID_RESULTS_TEXT, ID_RESULTSDB_TEXT, ID_Sequence, ID_Amplitude,
  ID_Duration, ID_DutyCycle, ID_Length = 10000, ID_dBMax,
  ID_dBMin, ID_Clear, ID_Invert, ID_Mode,
  ID_Draw, ID_Graphic, ID_Interp, ID_Linear,
  ID_Grid, ID_Curve, ID_Manage, ID_Delete,
  ID_Slider, ID_Duration = 20000, ID_Toggles = 21000, ID_Sliders = 22000,
  ID_Texts = 23000, ID_Duration = 10000, ID_Triggers = 11000, ID_Toggles = 12000,
  ID_Sliders = 13000, ID_Choices = 14000, ID_Texts = 15000, ID_TIMER = 20000,
  ID_BUTTON_GETPROFILE = 10001, ID_RADIOBUTTON_KEEPSIGNAL, ID_RADIOBUTTON_RESIDUE, ID_GAIN_SLIDER,
  ID_GAIN_TEXT, ID_NEW_SENSITIVITY_SLIDER, ID_NEW_SENSITIVITY_TEXT, ID_FREQ_SLIDER,
  ID_FREQ_TEXT, END_OF_BASIC_SLIDERS, END_OF_SLIDERS = END_OF_BASIC_SLIDERS, FIRST_SLIDER = ID_GAIN_SLIDER,
  ID_BUTTON_GETPROFILE = 10001, ID_BUTTON_LEAVENOISE, ID_RADIOBUTTON_KEEPSIGNAL, ID_RADIOBUTTON_KEEPNOISE,
  ID_SENSITIVITY_SLIDER, ID_GAIN_SLIDER, ID_FREQ_SLIDER, ID_TIME_SLIDER,
  ID_SENSITIVITY_TEXT, ID_GAIN_TEXT, ID_FREQ_TEXT, ID_TIME_TEXT,
  ID_Editor = 10000, ID_Load, ID_Save, ID_Slider = 11000,
  ID_Choice = 13000, ID_FILE = 15000, ID_Stages = 10000, ID_DryWet,
  ID_Freq, ID_Phase, ID_Depth, ID_Feedback,
  ID_OutGain, ID_RoomSize = 10000, ID_PreDelay, ID_Reverberance,
  ID_HfDamping, ID_ToneLow, ID_ToneHigh, ID_WetGain,
  ID_DryGain, ID_StereoWidth, ID_WetOnly, SBSMSOutBlockSize = 512,
  ID_FilterPanel = 10000, ID_dBMax, ID_dBMin, ID_Type,
  ID_SubType, ID_Order, ID_Ripple, ID_Cutoff,
  ID_StopbandRipple, ID_RatePercentChangeStart = 10000, ID_RatePercentChangeEnd, ID_PitchHalfStepsStart,
  ID_PitchHalfStepsEnd, ID_PitchPercentChangeStart, ID_PitchPercentChangeEnd, ID_Program = 10000,
  ID_Sliders = 11000, ID_Choices = 12000, ID_Texts = 13000, ID_Toggles = 14000,
  ID_Duration = 20000, ID_Sliders = 21000, ID_Freq = 10000, ID_Phase,
  ID_Depth, ID_Res, ID_FreqOfs, ID_OutGain,
  ID_MIXERPANEL = 10001, ID_SLIDER_CHANNEL, QUALITY_2 = 2, PRESET_INSANE = 0,
  PRESET_EXTREME = 1, PRESET_STANDARD = 2, PRESET_MEDIUM = 3, FormatID = 10001,
  OptionsID, DirID, CreateID, ChooseID,
  LabelID, FirstID, FirstFileNameID, TrackID,
  ByNameAndNumberID, ByNameID, ByNumberID, PrefixID,
  OverwriteID, FirstID = 7000, FreqZoomSliderID, FreqPanScrollerID,
  FreqExportButtonID, FreqAlgChoiceID, FreqSizeChoiceID, FreqFuncChoiceID,
  FreqAxisChoiceID, ReplotButtonID, GridOnOffID, ID_AVAIL = 1000,
  ID_FILESIZE, ID_TOTAL, ID_LEVELS, ID_DISCARD,
  ID_DISCARD_CLIPBOARD, ID_COMPACT, ChoiceID = 9000, PlayID,
  ID_INSERTA = 11000, ID_INSERTB, ID_REMOVE, ID_IMPORT,
  ID_EXPORT, kID_RadioButton_BouncingBall = 10101, kID_RadioButton_Highlight, ID_BITMAPBUTTON_MUSICAL_INSTRUMENT = 13000,
  ID_SLIDER_PAN, ID_SLIDER_GAIN, ID_TOGGLEBUTTON_MUTE, ID_TOGGLEBUTTON_SOLO,
  kModuleDisabled = 0, kModuleEnabled = 1, kModuleAsk = 2, kModuleFailed = 3,
  kModuleNew = 4, STATE_Enabled, STATE_Disabled, STATE_New,
  STATE_COUNT, HostID = 10000, PlayID, RecordID,
  ChannelsID, ToolColumn, ActionColumn, ButtonsColumn,
  CommentColumn, UseCustomTrackNameID = 1000, ID_WINDOW_SIZE = 10001, ID_DEFAULTS,
  ID_DEFAULTS = 10001, ID_SCALE, ID_RANGE, FSCKstatus_CLOSE_REQ = 0x1,
  FSCKstatus_CHANGED = 0x2, FSCKstatus_SAVE_AUP = 0x4, SNAP_OFF, SNAP_NEAREST,
  SNAP_PRIOR, FirstID = 1000, HSBarID, VSBarID,
  NextID, FFT_SinCosBRTable, FFT_SinCosTableVBR16, FFT_SinCosTableBR16,
  FFT_FastMathBR16, FFT_FastMathBR24, IdMainWindowSmall = 19200, IdMainWindowLarge,
  IdDirectory, IdDirChoose, IdOneSec, IdTenSec,
  IdOneMin, IdFiveMin, IdOneHour, IdShortTracks,
  IdMedTracks, IdTallTracks, IdDelayCheckBox, IdCaptureFirst,
  IdCaptureEffects = IdCaptureFirst, IdCaptureScriptables, IdCapturePreferences, IdCaptureToolbars,
  IdAllDelayedEvents, IdCaptureWindowContents =IdAllDelayedEvents, IdCaptureFullWindow, IdCaptureWindowPlus,
  IdCaptureFullScreen, IdCaptureSelectionBar, IdCaptureSpectralSelection, IdCaptureTimer,
  IdCaptureTools, IdCaptureTransport, IdCaptureMixer, IdCaptureMeter,
  IdCapturePlayMeter, IdCaptureRecordMeter, IdCaptureEdit, IdCaptureDevice,
  IdCaptureTranscription, IdCaptureScrub, IdCaptureTrackPanel, IdCaptureRuler,
  IdCaptureTracks, IdCaptureFirstTrack, IdCaptureSecondTrack, IdCaptureLast = IdCaptureSecondTrack,
  IdLastDelayedEvent, IdToggleBackgroundBlue, IdToggleBackgroundWhite, eOkButton = 0x0001,
  eCancelButton = 0x0002, eYesButton = 0x0004, eNoButton = 0x0008, eHelpButton = 0x0010,
  ePreviewButton = 0x0020, eDebugButton = 0x0040, eSettingsButton = 0x0080, ePreviewDryButton = 0x0100,
  eApplyButton = 0x0200, eCloseButton = 0x0400, DontShowID =1000, ID_DATEPICKER_START = 10000,
  ID_TIMETEXT_START, ID_DATEPICKER_END, ID_TIMETEXT_END, ID_TIMETEXT_DURATION,
  ID_AUTOSAVEPATH_BUTTON, ID_AUTOSAVEPATH_TEXT, ID_AUTOEXPORTPATH_BUTTON, ID_AUTOEXPORTPATH_TEXT,
  ID_AUTOSAVE_CHECKBOX, ID_AUTOEXPORT_CHECKBOX, POST_TIMER_RECORD_STOPPED = -3, POST_TIMER_RECORD_CANCEL_WAIT,
  POST_TIMER_RECORD_CANCEL, POST_TIMER_RECORD_NOTHING = 0, POST_TIMER_RECORD_CLOSE, ETBCutID,
  ETBCopyID, ETBPasteID, ETBTrimID, ETBSilenceID,
  ETBUndoID, ETBRedoID, ETBZoomInID, ETBZoomOutID,
  ETBZoomSelID, ETBZoomFitID, ETBNumButtons, STBScrubID,
  STBSeekID, STBRulerID, STBNumButtons, STBFirstButton = STBScrubID,
  SelectionBarFirstID = 2700, RateID, SnapToID, OnMenuID,
  ChoiceID, StartTimeID, LengthTimeID, CenterTimeID,
  EndTimeID, AudioTimeID, TimeBarFirstID = 2800, AudioPositionID,
  ToolBarFloatMargin = 1, NoDockID = 0, TopDockID, BotDockID,
  DockCount = 2, TTB_PlaySpeed, TTB_PlaySpeedSlider, TTBNumButtons,
  @0::kTimerInterval = 50, OnSetFontID = 30000, OnCutSelectedTextID = 1, OnCopySelectedTextID,
  OnPasteSelectedTextID, OnDeleteSelectedLabelID, OnEditSelectedLabelID, OnUpOctaveID = 30000,
  OnDownOctaveID, OnZoomFitVerticalID = 20000, OnZoomResetID, OnZoomDiv2ID,
  OnZoomTimes2ID, OnZoomHalfWaveID, OnZoomInVerticalID, OnZoomOutVerticalID,
  OnZoomMaxID, OnUpOctaveID, OnDownOctaveID, reserveDisplays = 100,
  OnRate8ID = 30000, OnRate11ID, OnRate16ID, OnRate22ID,
  OnRate44ID, OnRate48ID, OnRate88ID, OnRate96ID,
  OnRate176ID, OnRate192ID, OnRate352ID, OnRate384ID,
  OnRateOtherID, On16BitID, On24BitID, OnFloatID,
  OnMultiViewID, OnSetDisplayId, lastDisplayId = (OnSetDisplayId + reserveDisplays - 1), OnChannelLeftID,
  OnChannelRightID, OnChannelMonoID, OnMergeStereoID, OnSwapChannelsID,
  OnSplitStereoID, OnSplitStereoMonoID, ChannelMenuID, FirstAttachedItemId,
  OnZoomFitVerticalID = 20000, OnZoomResetID, OnZoomDiv2ID, OnZoomTimes2ID,
  OnZoomHalfWaveID, OnZoomInVerticalID, OnZoomOutVerticalID, OnFirstWaveformScaleID,
  OnLastWaveformScaleID = OnFirstWaveformScaleID + 9, OnFirstSpectrumScaleID, OnLastSpectrumScaleID = OnFirstSpectrumScaleID + 19, OnTimeTrackLinID = 30000,
  OnTimeTrackLogID, OnTimeTrackLogIntID, OnSetTimeTrackRangeID, OnSetNameID = 2000,
  OnMoveUpID, OnMoveDownID, OnMoveTopID, OnMoveBottomID,
  SCRUBBING_PIXEL_TOLERANCE = 10, kOneSecondCountdown = 1000 / ScrubPollInterval_ms, SELECTION_RESIZE_REGION = 3, FREQ_SNAP_DISTANCE = 10,
  ID_TIMER = wxID_HIGHEST + 1, DontShowID = wxID_HIGHEST + 1, kAffordancesAreaHeight = 20, kTopInset = 4,
  kTopMargin = kTopInset + kBorderThickness, kBottomMargin = kShadowThickness + kBorderThickness, kSeparatorThickness = kBottomMargin + kTopMargin, kToggleButtonID = 5000,
  kTimerID, OnMeterUpdateID = 6000, OnMonitorID, OnPreferencesID,
  kBorderThickness = 1, kShadowThickness = 1, kLeftInset = 4, kRightInset = kLeftInset,
  kLeftMargin = kLeftInset + kBorderThickness, kRightMargin = kRightInset + kShadowThickness + kBorderThickness, kTrackInfoWidth = 100 - kLeftMargin, MAX_HFFT = 10,
  ID_AUTOLOAD = 20000, ID_AUTOWRAP, ID_FONT, ID_SPLITV,
  ID_SPLITH, ID_TOGGLECODE, ID_TOGGLEOUTPUT, ID_SMALLICONS,
  ID_LARGEICONS, ID_MATCH, ID_TOP, ID_UP,
  ID_PREVIOUS, ID_NEXT, ID_GO, ID_STOP,
  ID_SCRIPT, ID_OUTPUT
}
 
enum  {
  ScrubHeight = 14, ProperRulerHeight = 29, ItemNumberColumn, ActionColumn,
  ParamsColumn, kJson, kLisp, kBrief,
  nFormats, FMT_WAV, FMT_OTHER, ID_ShowAll = 10000,
  ID_ShowEnabled, ID_ShowDisabled, ID_ShowNew, ID_List,
  ID_ClearAll, ID_SelectAll, ID_Enable, ID_Disable,
  ePreviewID = wxID_PREVIEW, eDebugID = wxID_LOWEST - 2, eSettingsID = wxID_LOWEST - 3, ePreviewDryID = wxID_LOWEST - 4,
  eCloseID = wxID_CANCEL, ClearID = 10000, EditID, ResetID,
  LoadID, SaveID, SaveDefaultsID, AddID,
  RemoveID, DontShowID, CONTROL_GROUP_SAVE, CONTROL_GROUP_EXPORT,
  ETBActTooltips = 1, ETBActEnableDisable = 2, kMidiCellWidth = ( ( kTrackInfoWidth + kLeftMargin ) / 4) - 2, kMidiCellHeight = kTrackInfoBtnSize,
  kTrackInfoBtnSize = 18, kTrackInfoSliderHeight = 25, kTrackInfoSliderWidth = 84, kTrackInfoSliderAllowance = 5,
  kTrackInfoSliderExtra = 5
}
 

Functions

void SetIfCreated (wxChoice *&Var, wxChoice *Val)
 
void SetIfCreated (wxTextCtrl *&Var, wxTextCtrl *Val)
 
void SetIfCreated (wxStaticText *&Var, wxStaticText *Val)
 
AUDACITY_DLL_API std::unique_ptr< wxSizer > CreateStdButtonSizer (wxWindow *parent, long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
 
AUDACITY_DLL_API TranslatableStrings Msgids (const EnumValueSymbol strings[], size_t nStrings)
 Convenience function often useful when adding choice controls. More...
 
AUDACITY_DLL_API TranslatableStrings Msgids (const std::vector< EnumValueSymbol > &strings)
 Convenience function often useful when adding choice controls. More...
 

Variables

const int nMaxNestedSizers = 20
 

Typedef Documentation

◆ wxNotebookPage

typedef wxWindow wxNotebookPage

Definition at line 62 of file ShuttleGui.h.

◆ wxSliderWrapper

using wxSliderWrapper = wxSlider

Definition at line 105 of file ShuttleGui.h.

◆ wxStaticBoxWrapper

using wxStaticBoxWrapper = wxStaticBox

Definition at line 104 of file ShuttleGui.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
IndicatorSmallWidth 
IndicatorMediumWidth 
IndicatorOffset 
TopMargin 
BottomMargin 
LeftMargin 
RightMargin 
LoggerID_Save 
LoggerID_Clear 
LoggerID_Close 
MIDI_MINIMAL_LATENCY_MS 
ID_QUIT_AUDACITY 
ID_DISCARD_SELECTED 
ID_RECOVER_SELECTED 
ID_SKIP 
ID_FILE_LIST 
AddButtonID 
RemoveButtonID 
RenameButtonID 
RestoreButtonID 
ImportButtonID 
ExportButtonID 
SaveButtonID 
DefaultsButtonID 
InsertButtonID 
EditButtonID 
DeleteButtonID 
UpButtonID 
DownButtonID 
ApplyToProjectButtonID 
ApplyToFilesButtonID 
RunID 
BSaveID 
ClearID 
StaticTextID 
BlockSizeID 
DataSizeID 
NumEditsID 
RandSeedID 
AU_SAMPLE_FORMAT_16 
AU_SAMPLE_FORMAT_24 
AU_SAMPLE_FORMAT_FLOAT 
kCommands 
kMenus 
kPreferences 
kTracks 
kClips 
kEnvelopes 
kLabels 
kBoxes 
nTypes 
kJson 
kLisp 
kBrief 
nFormats 
FileListID 
CopySelectedFilesButtonID 
CopyNamesToClipboardID 
FutureActionChoiceID 
ID_Amp 
ID_Peak 
ID_Clip 
ID_Bass 
ID_Treble 
ID_Gain 
ID_Link 
ID_PercentChange 
ID_Multiplier 
ID_FromVinyl 
ID_ToVinyl 
ID_ToLength 
ID_Thresh 
ID_Width 
ID_Threshold 
ID_NoiseFloor 
ID_Ratio 
ID_Attack 
ID_Decay 
ID_BUTTON_USECURRENTF 
ID_BUTTON_USECURRENTB 
ID_BUTTON_EXPORT 
ID_BUTTON_RESET 
ID_FOREGROUNDSTART_T 
ID_FOREGROUNDEND_T 
ID_BACKGROUNDSTART_T 
ID_BACKGROUNDEND_T 
ID_FOREGROUNDDB_TEXT 
ID_BACKGROUNDDB_TEXT 
ID_RESULTS_TEXT 
ID_RESULTSDB_TEXT 
ID_Sequence 
ID_Amplitude 
ID_Duration 
ID_DutyCycle 
ID_Length 
ID_dBMax 
ID_dBMin 
ID_Clear 
ID_Invert 
ID_Mode 
ID_Draw 
ID_Graphic 
ID_Interp 
ID_Linear 
ID_Grid 
ID_Curve 
ID_Manage 
ID_Delete 
ID_Slider 
ID_Duration 
ID_Toggles 
ID_Sliders 
ID_Texts 
ID_Duration 
ID_Triggers 
ID_Toggles 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_TIMER 
ID_BUTTON_GETPROFILE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_RESIDUE 
ID_GAIN_SLIDER 
ID_GAIN_TEXT 
ID_NEW_SENSITIVITY_SLIDER 
ID_NEW_SENSITIVITY_TEXT 
ID_FREQ_SLIDER 
ID_FREQ_TEXT 
END_OF_BASIC_SLIDERS 
END_OF_SLIDERS 
FIRST_SLIDER 
ID_BUTTON_GETPROFILE 
ID_BUTTON_LEAVENOISE 
ID_RADIOBUTTON_KEEPSIGNAL 
ID_RADIOBUTTON_KEEPNOISE 
ID_SENSITIVITY_SLIDER 
ID_GAIN_SLIDER 
ID_FREQ_SLIDER 
ID_TIME_SLIDER 
ID_SENSITIVITY_TEXT 
ID_GAIN_TEXT 
ID_FREQ_TEXT 
ID_TIME_TEXT 
ID_Editor 
ID_Load 
ID_Save 
ID_Slider 
ID_Choice 
ID_FILE 
ID_Stages 
ID_DryWet 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Feedback 
ID_OutGain 
ID_RoomSize 
ID_PreDelay 
ID_Reverberance 
ID_HfDamping 
ID_ToneLow 
ID_ToneHigh 
ID_WetGain 
ID_DryGain 
ID_StereoWidth 
ID_WetOnly 
SBSMSOutBlockSize 
ID_FilterPanel 
ID_dBMax 
ID_dBMin 
ID_Type 
ID_SubType 
ID_Order 
ID_Ripple 
ID_Cutoff 
ID_StopbandRipple 
ID_RatePercentChangeStart 
ID_RatePercentChangeEnd 
ID_PitchHalfStepsStart 
ID_PitchHalfStepsEnd 
ID_PitchPercentChangeStart 
ID_PitchPercentChangeEnd 
ID_Program 
ID_Sliders 
ID_Choices 
ID_Texts 
ID_Toggles 
ID_Duration 
ID_Sliders 
ID_Freq 
ID_Phase 
ID_Depth 
ID_Res 
ID_FreqOfs 
ID_OutGain 
ID_MIXERPANEL 
ID_SLIDER_CHANNEL 
QUALITY_2 
PRESET_INSANE 
PRESET_EXTREME 
PRESET_STANDARD 
PRESET_MEDIUM 
FormatID 
OptionsID 
DirID 
CreateID 
ChooseID 
LabelID 
FirstID 
FirstFileNameID 
TrackID 
ByNameAndNumberID 
ByNameID 
ByNumberID 
PrefixID 
OverwriteID 
FirstID 
FreqZoomSliderID 
FreqPanScrollerID 
FreqExportButtonID 
FreqAlgChoiceID 
FreqSizeChoiceID 
FreqFuncChoiceID 
FreqAxisChoiceID 
ReplotButtonID 
GridOnOffID 
ID_AVAIL 
ID_FILESIZE 
ID_TOTAL 
ID_LEVELS 
ID_DISCARD 
ID_DISCARD_CLIPBOARD 
ID_COMPACT 
ChoiceID 
PlayID 
ID_INSERTA 
ID_INSERTB 
ID_REMOVE 
ID_IMPORT 
ID_EXPORT 
kID_RadioButton_BouncingBall 
kID_RadioButton_Highlight 
ID_BITMAPBUTTON_MUSICAL_INSTRUMENT 
ID_SLIDER_PAN 
ID_SLIDER_GAIN 
ID_TOGGLEBUTTON_MUTE 
ID_TOGGLEBUTTON_SOLO 
kModuleDisabled 
kModuleEnabled 
kModuleAsk 
kModuleFailed 
kModuleNew 
STATE_Enabled 
STATE_Disabled 
STATE_New 
STATE_COUNT 
HostID 
PlayID 
RecordID 
ChannelsID 
ToolColumn 
ActionColumn 
ButtonsColumn 
CommentColumn 
UseCustomTrackNameID 
ID_WINDOW_SIZE 
ID_DEFAULTS 
ID_DEFAULTS 
ID_SCALE 
ID_RANGE 
FSCKstatus_CLOSE_REQ 
FSCKstatus_CHANGED 
FSCKstatus_SAVE_AUP 
SNAP_OFF 
SNAP_NEAREST 
SNAP_PRIOR 
FirstID 
HSBarID 
VSBarID 
NextID 
FFT_SinCosBRTable 
FFT_SinCosTableVBR16 
FFT_SinCosTableBR16 
FFT_FastMathBR16 
FFT_FastMathBR24 
IdMainWindowSmall 
IdMainWindowLarge 
IdDirectory 
IdDirChoose 
IdOneSec 
IdTenSec 
IdOneMin 
IdFiveMin 
IdOneHour 
IdShortTracks 
IdMedTracks 
IdTallTracks 
IdDelayCheckBox 
IdCaptureFirst 
IdCaptureEffects 
IdCaptureScriptables 
IdCapturePreferences 
IdCaptureToolbars 
IdAllDelayedEvents 
IdCaptureWindowContents 
IdCaptureFullWindow 
IdCaptureWindowPlus 
IdCaptureFullScreen 
IdCaptureSelectionBar 
IdCaptureSpectralSelection 
IdCaptureTimer 
IdCaptureTools 
IdCaptureTransport 
IdCaptureMixer 
IdCaptureMeter 
IdCapturePlayMeter 
IdCaptureRecordMeter 
IdCaptureEdit 
IdCaptureDevice 
IdCaptureTranscription 
IdCaptureScrub 
IdCaptureTrackPanel 
IdCaptureRuler 
IdCaptureTracks 
IdCaptureFirstTrack 
IdCaptureSecondTrack 
IdCaptureLast 
IdLastDelayedEvent 
IdToggleBackgroundBlue 
IdToggleBackgroundWhite 
eOkButton 
eCancelButton 
eYesButton 
eNoButton 
eHelpButton 
ePreviewButton 
eDebugButton 
eSettingsButton 
ePreviewDryButton 
eApplyButton 
eCloseButton 
DontShowID 
ID_DATEPICKER_START 
ID_TIMETEXT_START 
ID_DATEPICKER_END 
ID_TIMETEXT_END 
ID_TIMETEXT_DURATION 
ID_AUTOSAVEPATH_BUTTON 
ID_AUTOSAVEPATH_TEXT 
ID_AUTOEXPORTPATH_BUTTON 
ID_AUTOEXPORTPATH_TEXT 
ID_AUTOSAVE_CHECKBOX 
ID_AUTOEXPORT_CHECKBOX 
POST_TIMER_RECORD_STOPPED 
POST_TIMER_RECORD_CANCEL_WAIT 
POST_TIMER_RECORD_CANCEL 
POST_TIMER_RECORD_NOTHING 
POST_TIMER_RECORD_CLOSE 
ETBCutID 
ETBCopyID 
ETBPasteID 
ETBTrimID 
ETBSilenceID 
ETBUndoID 
ETBRedoID 
ETBZoomInID 
ETBZoomOutID 
ETBZoomSelID 
ETBZoomFitID 
ETBNumButtons 
STBScrubID 
STBSeekID 
STBRulerID 
STBNumButtons 
STBFirstButton 
SelectionBarFirstID 
RateID 
SnapToID 
OnMenuID 
ChoiceID 
StartTimeID 
LengthTimeID 
CenterTimeID 
EndTimeID 
AudioTimeID 
TimeBarFirstID 
AudioPositionID 
ToolBarFloatMargin 
NoDockID 
TopDockID 
BotDockID 
DockCount 
TTB_PlaySpeed 
TTB_PlaySpeedSlider 
TTBNumButtons 
kTimerInterval 
OnSetFontID 
OnCutSelectedTextID 
OnCopySelectedTextID 
OnPasteSelectedTextID 
OnDeleteSelectedLabelID 
OnEditSelectedLabelID 
OnUpOctaveID 
OnDownOctaveID 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnZoomMaxID 
OnUpOctaveID 
OnDownOctaveID 
reserveDisplays 
OnRate8ID 
OnRate11ID 
OnRate16ID 
OnRate22ID 
OnRate44ID 
OnRate48ID 
OnRate88ID 
OnRate96ID 
OnRate176ID 
OnRate192ID 
OnRate352ID 
OnRate384ID 
OnRateOtherID 
On16BitID 
On24BitID 
OnFloatID 
OnMultiViewID 
OnSetDisplayId 
lastDisplayId 
OnChannelLeftID 
OnChannelRightID 
OnChannelMonoID 
OnMergeStereoID 
OnSwapChannelsID 
OnSplitStereoID 
OnSplitStereoMonoID 
ChannelMenuID 
FirstAttachedItemId 
OnZoomFitVerticalID 
OnZoomResetID 
OnZoomDiv2ID 
OnZoomTimes2ID 
OnZoomHalfWaveID 
OnZoomInVerticalID 
OnZoomOutVerticalID 
OnFirstWaveformScaleID 
OnLastWaveformScaleID 
OnFirstSpectrumScaleID 
OnLastSpectrumScaleID 
OnTimeTrackLinID 
OnTimeTrackLogID 
OnTimeTrackLogIntID 
OnSetTimeTrackRangeID 
OnSetNameID 
OnMoveUpID 
OnMoveDownID 
OnMoveTopID 
OnMoveBottomID 
SCRUBBING_PIXEL_TOLERANCE 
kOneSecondCountdown 
SELECTION_RESIZE_REGION 
FREQ_SNAP_DISTANCE 
ID_TIMER 
DontShowID 
kAffordancesAreaHeight 
kTopInset 
kTopMargin 
kBottomMargin 
kSeparatorThickness 
kToggleButtonID 
kTimerID 
OnMeterUpdateID 
OnMonitorID 
OnPreferencesID 
kBorderThickness 
kShadowThickness 
kLeftInset 
kRightInset 
kLeftMargin 
kRightMargin 
kTrackInfoWidth 
MAX_HFFT 
ID_AUTOLOAD 
ID_AUTOWRAP 
ID_FONT 
ID_SPLITV 
ID_SPLITH 
ID_TOGGLECODE 
ID_TOGGLEOUTPUT 
ID_SMALLICONS 
ID_LARGEICONS 
ID_MATCH 
ID_TOP 
ID_UP 
ID_PREVIOUS 
ID_NEXT 
ID_GO 
ID_STOP 
ID_SCRIPT 
ID_OUTPUT 

Definition at line 598 of file ShuttleGui.h.

599 {
600  eOkButton = 0x0001,
601  eCancelButton = 0x0002,
602  eYesButton = 0x0004,
603  eNoButton = 0x0008,
604  eHelpButton = 0x0010,
605  ePreviewButton = 0x0020,
606  eDebugButton = 0x0040,
607  eSettingsButton= 0x0080,
608  ePreviewDryButton = 0x0100,
609  eApplyButton = 0x0200,
610  eCloseButton = 0x0400,
611 };

◆ anonymous enum

anonymous enum
Enumerator
ScrubHeight 
ProperRulerHeight 
ItemNumberColumn 
ActionColumn 
ParamsColumn 
kJson 
kLisp 
kBrief 
nFormats 
FMT_WAV 
FMT_OTHER 
ID_ShowAll 
ID_ShowEnabled 
ID_ShowDisabled 
ID_ShowNew 
ID_List 
ID_ClearAll 
ID_SelectAll 
ID_Enable 
ID_Disable 
ePreviewID 
eDebugID 
eSettingsID 
ePreviewDryID 
eCloseID 
ClearID 
EditID 
ResetID 
LoadID 
SaveID 
SaveDefaultsID 
AddID 
RemoveID 
DontShowID 
CONTROL_GROUP_SAVE 
CONTROL_GROUP_EXPORT 
ETBActTooltips 
ETBActEnableDisable 
kMidiCellWidth 
kMidiCellHeight 
kTrackInfoBtnSize 
kTrackInfoSliderHeight 
kTrackInfoSliderWidth 
kTrackInfoSliderAllowance 
kTrackInfoSliderExtra 

Definition at line 613 of file ShuttleGui.h.

614 {
615  // ePreviewID = wxID_LOWEST - 1,
616  // But there is a wxID_PREVIEW
617  ePreviewID = wxID_PREVIEW,
618 
619  eDebugID = wxID_LOWEST - 2,
620  eSettingsID = wxID_LOWEST - 3,
621  ePreviewDryID = wxID_LOWEST - 4,
622  eCloseID = wxID_CANCEL
623 };

◆ teShuttleMode

Enumerator
eIsCreating 
eIsGettingFromDialog 
eIsSettingToDialog 
eIsGettingMetadata 
eIsCreatingFromPrefs 
eIsSavingToPrefs 

Definition at line 36 of file ShuttleGui.h.

37 {
42 
43  // Next two are only ever seen in constructor.
44  // After that they revert to one of the modes above.
45  // They are used to achieve 'two step' operation,
46  // where we transfer between two shuttles in one go.
49 };

Function Documentation

◆ CreateStdButtonSizer()

AUDACITY_DLL_API std::unique_ptr<wxSizer> CreateStdButtonSizer ( wxWindow *  parent,
long  buttons = eOkButton|eCancelButton,
wxWindow *  extra = NULL 
)

Definition at line 2286 of file ShuttleGui.cpp.

2287 {
2288  wxASSERT(parent != NULL); // To justify safenew
2289 
2290  int margin;
2291  {
2292 #if defined(__WXMAC__)
2293  margin = 12;
2294 #elif defined(__WXGTK20__)
2295  margin = 12;
2296 #elif defined(__WXMSW__)
2297  wxButton b(parent, 0, wxEmptyString);
2298  margin = b.ConvertDialogToPixels(wxSize(2, 0)).x;
2299 #else
2300  wxButton b(parent, 0, wxEmptyString);
2301  margin = b->ConvertDialogToPixels(wxSize(4, 0)).x;
2302 #endif
2303  }
2304 
2305  wxButton *b = NULL;
2306  auto bs = std::make_unique<wxStdDialogButtonSizer>();
2307 
2308  if( buttons & eOkButton )
2309  {
2310  b = safenew wxButton(parent, wxID_OK);
2311  b->SetDefault();
2312  bs->AddButton( b );
2313  }
2314 
2315  if( buttons & eCancelButton )
2316  {
2317  bs->AddButton(safenew wxButton(parent, wxID_CANCEL));
2318  }
2319 
2320  if( buttons & eYesButton )
2321  {
2322  b = safenew wxButton(parent, wxID_YES);
2323  b->SetDefault();
2324  bs->AddButton( b );
2325  }
2326 
2327  if( buttons & eNoButton )
2328  {
2329  bs->AddButton(safenew wxButton(parent, wxID_NO));
2330  }
2331 
2332  if( buttons & eApplyButton )
2333  {
2334  b = safenew wxButton(parent, wxID_APPLY);
2335  b->SetDefault();
2336  bs->AddButton( b );
2337  }
2338 
2339  if( buttons & eCloseButton )
2340  {
2341  bs->AddButton(safenew wxButton(parent, wxID_CANCEL, XO("&Close").Translation()));
2342  }
2343 
2344 #if defined(__WXMSW__)
2345  // See below for explanation
2346  if( buttons & eHelpButton )
2347  {
2348  // Replace standard Help button with smaller icon button.
2349  // bs->AddButton(safenew wxButton(parent, wxID_HELP));
2350  b = safenew wxBitmapButton(parent, wxID_HELP, theTheme.Bitmap( bmpHelpIcon ));
2351  b->SetToolTip( XO("Help").Translation() );
2352  b->SetLabel(XO("Help").Translation()); // for screen readers
2353  bs->AddButton( b );
2354  }
2355 #endif
2356 
2357  if (buttons & ePreviewButton)
2358  {
2359  bs->Add(safenew wxButton(parent, ePreviewID, XO("&Preview").Translation()), 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin);
2360  }
2361  if (buttons & ePreviewDryButton)
2362  {
2363  bs->Add(safenew wxButton(parent, ePreviewDryID, XO("Dry Previe&w").Translation()), 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin);
2364  bs->Add( 20, 0 );
2365  }
2366 
2367  if( buttons & eSettingsButton )
2368  {
2369  bs->Add(safenew wxButton(parent, eSettingsID, XO("&Settings").Translation()), 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin);
2370  bs->Add( 20, 0 );
2371  }
2372 
2373  if( extra )
2374  {
2375  bs->Add( extra, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin );
2376  bs->Add( 40, 0 );
2377  }
2378 
2379  bs->AddStretchSpacer();
2380  bs->Realize();
2381 
2382  size_t lastLastSpacer = 0;
2383  size_t lastSpacer = 0;
2384  wxSizerItemList & list = bs->GetChildren();
2385  for( size_t i = 0, cnt = list.size(); i < cnt; i++ )
2386  {
2387  if( list[i]->IsSpacer() )
2388  {
2389  lastSpacer = i;
2390  }
2391  else
2392  {
2393  lastLastSpacer = lastSpacer;
2394  }
2395  }
2396 
2397  // Add any buttons that need to cuddle up to the right hand cluster
2398  if( buttons & eDebugButton )
2399  {
2400  b = safenew wxButton(parent, eDebugID, XO("Debu&g").Translation());
2401  bs->Insert( ++lastLastSpacer, b, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, margin );
2402  }
2403 
2404 #if !defined(__WXMSW__)
2405  // Bug #2432: Couldn't find GTK guidelines, but Mac HIGs state:
2406  //
2407  // View style Help button position
2408  // Dialog with dismissal buttons (like OK and Cancel). Lower-left corner, vertically aligned with the dismissal buttons.
2409  // Dialog without dismissal buttons. Lower-left or lower-right corner.
2410  // Preference window or pane. Lower-left or lower-right corner.
2411  //
2412  // So, we're gonna cheat a little and use the lower-right corner.
2413  if( buttons & eHelpButton )
2414  {
2415  // Replace standard Help button with smaller icon button.
2416  // bs->AddButton(safenew wxButton(parent, wxID_HELP));
2417  b = safenew wxBitmapButton(parent, wxID_HELP, theTheme.Bitmap( bmpHelpIcon ));
2418  b->SetToolTip( XO("Help").Translation() );
2419  b->SetLabel(XO("Help").Translation()); // for screen readers
2420  bs->Add( b, 0, wxALIGN_CENTER );
2421  }
2422 #endif
2423 
2424 
2425  auto s = std::make_unique<wxBoxSizer>( wxVERTICAL );
2426  s->Add( bs.release(), 1, wxEXPAND | wxALL, 7 );
2427  s->Add( 0, 3 ); // a little extra space
2428 
2429  return std::unique_ptr<wxSizer>{ s.release() };
2430 }

References ThemeBase::Bitmap(), eApplyButton, eCancelButton, eCloseButton, eDebugButton, eDebugID, eHelpButton, eNoButton, eOkButton, ePreviewButton, ePreviewDryButton, ePreviewDryID, ePreviewID, eSettingsButton, eSettingsID, eYesButton, safenew, theTheme, and XO.

Referenced by ShuttleGui::AddStandardButtons().

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

◆ Msgids() [1/2]

AUDACITY_DLL_API TranslatableStrings Msgids ( const EnumValueSymbol  strings[],
size_t  nStrings 
)

Convenience function often useful when adding choice controls.

Definition at line 2510 of file ShuttleGui.cpp.

2512 {
2513  return transform_range<TranslatableStrings>(
2514  strings, strings + nStrings,
2515  std::mem_fn( &EnumValueSymbol::Msgid )
2516  );
2517 }

References ComponentInterfaceSymbol::Msgid().

Referenced by NyquistEffect::BuildEffectWindow(), Msgids(), DragCommand::PopulateOrExchange(), GetInfoCommand::PopulateOrExchange(), GetTrackInfoCommand::PopulateOrExchange(), HelpCommand::PopulateOrExchange(), ScreenshotCommand::PopulateOrExchange(), SelectTimeCommand::PopulateOrExchange(), SelectTracksCommand::PopulateOrExchange(), SetClipCommand::PopulateOrExchange(), SetTrackVisualsCommand::PopulateOrExchange(), EffectDistortion::PopulateOrExchange(), EffectEqualization::PopulateOrExchange(), EffectLoudness::PopulateOrExchange(), EffectNoise::PopulateOrExchange(), EffectScienFilter::PopulateOrExchange(), EffectToneGen::PopulateOrExchange(), EffectTruncSilence::PopulateOrExchange(), SpectrumPrefs::PopulateOrExchange(), and WaveformPrefs::PopulateOrExchange().

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

◆ Msgids() [2/2]

AUDACITY_DLL_API TranslatableStrings Msgids ( const std::vector< EnumValueSymbol > &  strings)

Convenience function often useful when adding choice controls.

Definition at line 2519 of file ShuttleGui.cpp.

2520 {
2521  return Msgids( strings.data(), strings.size() );
2522 }

References Msgids().

Here is the call graph for this function:

◆ SetIfCreated() [1/3]

void SetIfCreated ( wxChoice *&  Var,
wxChoice *  Val 
)

Definition at line 2223 of file ShuttleGui.cpp.

2224 {
2225  if( Val != NULL )
2226  Var = Val;
2227 };

◆ SetIfCreated() [2/3]

void SetIfCreated ( wxStaticText *&  Var,
wxStaticText *  Val 
)

Definition at line 2233 of file ShuttleGui.cpp.

2234 {
2235  if( Val != NULL )
2236  Var = Val;
2237 };

◆ SetIfCreated() [3/3]

void SetIfCreated ( wxTextCtrl *&  Var,
wxTextCtrl *  Val 
)

Definition at line 2228 of file ShuttleGui.cpp.

2229 {
2230  if( Val != NULL )
2231  Var = Val;
2232 };

Variable Documentation

◆ nMaxNestedSizers

const int nMaxNestedSizers = 20

Definition at line 34 of file ShuttleGui.h.

Referenced by ShuttleGuiBase::PushSizer().

eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
eIsGettingFromDialog
@ eIsGettingFromDialog
Definition: ShuttleGui.h:39
eHelpButton
@ eHelpButton
Definition: ShuttleGui.h:604
ePreviewButton
@ ePreviewButton
Definition: ShuttleGui.h:605
XO
#define XO(s)
Definition: Internat.h:31
eDebugButton
@ eDebugButton
Definition: ShuttleGui.h:606
eCloseID
@ eCloseID
Definition: ShuttleGui.h:622
ComponentInterfaceSymbol::Msgid
const TranslatableString & Msgid() const
Definition: ComponentInterfaceSymbol.h:56
eIsSettingToDialog
@ eIsSettingToDialog
Definition: ShuttleGui.h:40
ePreviewDryID
@ ePreviewDryID
Definition: ShuttleGui.h:621
eApplyButton
@ eApplyButton
Definition: ShuttleGui.h:609
ThemeBase::Bitmap
wxBitmap & Bitmap(int iIndex)
Definition: Theme.cpp:1216
ePreviewID
@ ePreviewID
Definition: ShuttleGui.h:617
ePreviewDryButton
@ ePreviewDryButton
Definition: ShuttleGui.h:608
eDebugID
@ eDebugID
Definition: ShuttleGui.h:619
eCancelButton
@ eCancelButton
Definition: ShuttleGui.h:601
eYesButton
@ eYesButton
Definition: ShuttleGui.h:602
Msgids
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
Definition: ShuttleGui.cpp:2510
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
eIsGettingMetadata
@ eIsGettingMetadata
Definition: ShuttleGui.h:41
eOkButton
@ eOkButton
Definition: ShuttleGui.h:600
eCloseButton
@ eCloseButton
Definition: ShuttleGui.h:610
theTheme
AUDACITY_DLL_API Theme theTheme
Definition: Theme.cpp:203
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
safenew
#define safenew
Definition: MemoryX.h:10
eSettingsID
@ eSettingsID
Definition: ShuttleGui.h:620
eSettingsButton
@ eSettingsButton
Definition: ShuttleGui.h:607
eNoButton
@ eNoButton
Definition: ShuttleGui.h:603