MCPcopy Create free account
hub / github.com/audacity/audacity / PopulateOrExchange

Method PopulateOrExchange

src/BatchCommandDialog.cpp:80–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S)
81{
82 S.StartVerticalLay(true);
83 {
84 S.StartMultiColumn(4, wxEXPAND);
85 {
86 S.SetStretchyCol(1);
87 mCommand = S.AddTextBox(XXO("&Command"), wxT(""), 20);
88 mCommand->SetEditable(false);
89 mEditParams = S.Id(EditParamsButtonID)
90 .Disable() // disable button as box is empty
91 .AddButton(XXO("&Edit Parameters"));
92 mUsePreset = S.Id(UsePresetButtonID)
93 .Disable() // disable button as box is empty
94 .AddButton(XXO("&Use Preset"));
95 }
96 S.EndMultiColumn();
97
98 S.StartMultiColumn(2, wxEXPAND);
99 {
100 S.SetStretchyCol(1);
101 mParameters = S.AddTextBox(XXO("&Parameters"), wxT(""), 0);
102 mParameters->SetEditable(false);
103 auto prompt = XXO("&Details");
104 S.Prop(0).AddPrompt(prompt);
105 mDetails = S
106 .Name( prompt )
107 .AddTextWindow( wxT(""));
108 mDetails->SetEditable(false);
109 }
110 S.EndMultiColumn();
111
112 S.Prop(10).StartStatic(XO("Choose command"), true);
113 {
114 mChoices = S.Id(CommandsListID)
115 .Style( wxLC_LIST | wxLC_SINGLE_SEL)
116 .AddListControl();
117 }
118 S.EndStatic();
119 }
120 S.EndVerticalLay();
121
122 S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton);
123
124 PopulateCommandList();
125 if (mChoices->GetItemCount() > 0) {
126 // set first item to be selected (and the focus when the
127 // list first becomes the focus)
128 mChoices->SetItemState(0, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED,
129 wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED);
130 }
131
132 SetMinSize(wxSize(780, 560));
133 Fit();
134 Center();
135}
136
137void MacroCommandDialog::PopulateCommandList()

Callers

nothing calls this directly

Calls 10

SetStretchyColMethod · 0.80
AddTextBoxMethod · 0.80
DisableMethod · 0.80
AddPromptMethod · 0.80
AddTextWindowMethod · 0.80
StartStaticMethod · 0.80
AddListControlMethod · 0.80
EndStaticMethod · 0.80
wxSizeClass · 0.50
AddButtonMethod · 0.45

Tested by

no test coverage detected