Audacity 3.2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
EqualizationCurvesDialog Class Referencefinal

EqualizationCurvesDialog manages the available preset curves. More...

#include <EqualizationCurvesDialog.h>

Inheritance diagram for EqualizationCurvesDialog:
[legend]
Collaboration diagram for EqualizationCurvesDialog:
[legend]

Public Member Functions

 EqualizationCurvesDialog (wxWindow *parent, const TranslatableString &name, int options, EQCurveArray &curves, int position)
 
 ~EqualizationCurvesDialog ()
 
int GetItem () const
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Types

enum  EQCurvesDialogControls {
  CurvesListID = 11000 , UpButtonID , DownButtonID , RenameButtonID ,
  DeleteButtonID , ImportButtonID , ExportButtonID , LibraryButtonID ,
  DefaultsButtonID
}
 

Private Member Functions

void Populate ()
 Creates the dialog and its contents. More...
 
void PopulateOrExchange (ShuttleGui &S)
 Defines the dialog and does data exchange with it. More...
 
void PopulateList (int position)
 
void OnUp (wxCommandEvent &event)
 
void OnDown (wxCommandEvent &event)
 
long GetPreviousItem (long item)
 
void OnRename (wxCommandEvent &event)
 
void OnDelete (wxCommandEvent &event)
 
void OnImport (wxCommandEvent &event)
 
void OnExport (wxCommandEvent &event)
 
void OnLibrary (wxCommandEvent &event)
 
void OnDefaults (wxCommandEvent &event)
 
void OnOK (wxCommandEvent &event)
 
void OnListSelectionChange (wxListEvent &event)
 

Private Attributes

const TranslatableStringmName
 
const int mOptions
 
EQCurveArraymCurves
 
wxListCtrl * mList
 
EQCurveArray mEditCurves
 
wxWindow * mParent
 
int mPosition
 
int mItem { -1 }
 

Detailed Description

EqualizationCurvesDialog manages the available preset curves.

Definition at line 24 of file EqualizationCurvesDialog.h.

Member Enumeration Documentation

◆ EQCurvesDialogControls

Constructor & Destructor Documentation

◆ EqualizationCurvesDialog()

EqualizationCurvesDialog::OnListSelectionChange EqualizationCurvesDialog::EqualizationCurvesDialog ( wxWindow *  parent,
const TranslatableString name,
int  options,
EQCurveArray curves,
int  position 
)

Definition at line 38 of file EqualizationCurvesDialog.cpp.

41 : wxDialogWrapper(parent, wxID_ANY, XO("Manage Curves List"),
42 wxDefaultPosition, wxDefaultSize,
43 wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
44 , mName{ name }
45 , mOptions{ options }
46 , mCurves{ curves }
47{
48 SetLabel(XO("Manage Curves")); // Provide visual label
49 SetName(XO("Manage Curves List")); // Provide audible label
50 mParent = parent;
51 mPosition = position;
52 // make a copy of curves here to muck about with.
53 mEditCurves = curves;
54
55 Populate();
56 SetMinSize(GetSize());
57}
XO("Cut/Copy/Paste")
wxString name
Definition: TagsEditor.cpp:166
const TranslatableString & mName
void Populate()
Creates the dialog and its contents.
void SetLabel(const TranslatableString &title)

References name.

◆ ~EqualizationCurvesDialog()

EqualizationCurvesDialog::~EqualizationCurvesDialog ( )

Definition at line 59 of file EqualizationCurvesDialog.cpp.

60{
61}

Member Function Documentation

◆ GetItem()

int EqualizationCurvesDialog::GetItem ( ) const
inline

Definition at line 30 of file EqualizationCurvesDialog.h.

References mItem.

Referenced by EqualizationUI::OnManage().

Here is the caller graph for this function:

◆ GetPreviousItem()

long EqualizationCurvesDialog::GetPreviousItem ( long  item)
private

Definition at line 205 of file EqualizationCurvesDialog.cpp.

206{
207 long lastItem = -1;
208 long itemTemp = mList->GetNextItem(-1, wxLIST_NEXT_ALL,
209 wxLIST_STATE_SELECTED);
210 while( (itemTemp != -1) && (itemTemp < item) )
211 {
212 lastItem = itemTemp;
213 itemTemp = mList->GetNextItem(itemTemp, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
214 }
215 return lastItem;
216}

References mList.

Referenced by OnDown().

Here is the caller graph for this function:

◆ OnDefaults()

void EqualizationCurvesDialog::OnDefaults ( wxCommandEvent &  event)
private

Definition at line 499 of file EqualizationCurvesDialog.cpp.

500{
501 // we expect this to fail in LoadCurves (due to a lack of path) and handle that there
503 .LoadCurves( wxT("EQDefaultCurves.xml") );
504 PopulateList(0); // update the EqualizationCurvesDialog dialog
505}
wxT("CloseDown"))
Deserializer of curves from XML files.

References mEditCurves, mName, mOptions, PopulateList(), and wxT().

Here is the call graph for this function:

◆ OnDelete()

void EqualizationCurvesDialog::OnDelete ( wxCommandEvent &  event)
private

Definition at line 335 of file EqualizationCurvesDialog.cpp.

336{
337 // We could count them here
338 // And then put in a 'Delete N items?' prompt.
339
340#if 0 // 'one at a time' prompt code
341 // Get the first one to be deleted
342 long item = mList->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
343 // Take care, mList and mEditCurves will get out of sync as curves are deleted
344 int deleted = 0;
345 long highlight = -1;
346
347 while(item >= 0)
348 {
349 if(item == mList->GetItemCount()-1) //unnamed
350 {
352 XO("You cannot delete the 'unnamed' curve."),
353 XO("Can't delete 'unnamed'") );
354 }
355 else
356 {
357 // Create the prompt
358 auto quest = XO("Delete '%s'?")
359 .Format(mEditCurves[ item-deleted ].Name);
360
361 // Ask for confirmation before removal
363 quest,
364 XO("Confirm Deletion") );
365 if( ans == wxYES )
366 { // Remove the curve from the array
367 mEditCurves.erase( mEditCurves.begin() + (item - deleted) );
368 deleted++;
369 }
370 else
371 highlight = item-deleted; // if user presses 'No', select that curve
372 }
373 // get next selected item
374 item = mList->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
375 }
376
377 if(highlight == -1)
378 PopulateList(mEditCurves.size()-1); // set 'unnamed' as the selected curve
379 else
380 PopulateList(highlight); // user said 'No' to deletion
381#else // 'DELETE all N' code
382 int count = mList->GetSelectedItemCount();
383 long item = mList->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
384 // Create the prompt
385 TranslatableString quest;
386 if( count > 1 )
387 quest = XO("Delete %d items?").Format( count );
388 else
389 if( count == 1 )
390 quest = XO("Delete '%s'?").Format( mEditCurves[ item ].Name );
391 else
392 return;
393 // Ask for confirmation before removal
395 quest,
396 XO("Confirm Deletion"),
397 wxYES_NO | wxCENTRE );
398 if( ans == wxYES )
399 { // Remove the curve(s) from the array
400 // Take care, mList and mEditCurves will get out of sync as curves are deleted
401 int deleted = 0;
402 while(item >= 0)
403 {
404 // TODO: Migrate to the standard "Manage" dialog.
405 if(item == mList->GetItemCount()-1) //unnamed
406 {
408 XO("You cannot delete the 'unnamed' curve, it is special."),
409 XO("Can't delete 'unnamed'"));
410 }
411 else
412 {
413 mEditCurves.erase( mEditCurves.begin() + item - deleted );
414 deleted++;
415 }
416 item = mList->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
417 }
418 PopulateList(mEditCurves.size() - 1); // set 'unnamed' as the selected curve
419 }
420#endif
421}
Holds a msgid for the translation catalog; may also bind format arguments.
int DoMessageBox(const TranslatableString &name, const TranslatableString &msg, const TranslatableString &titleStr, long style=wxOK|wxCENTRE)

References EQUtils::DoMessageBox(), mEditCurves, mList, mName, PopulateList(), and XO().

Here is the call graph for this function:

◆ OnDown()

void EqualizationCurvesDialog::OnDown ( wxCommandEvent &  event)
private

Definition at line 174 of file EqualizationCurvesDialog.cpp.

175{ // looks harder than OnUp as we need to seek backwards up the list, hence GetPreviousItem
176 long item = GetPreviousItem(mList->GetItemCount());
177 if( item == -1 )
178 return; // nothing selected
179 int state;
180 while( item != -1 )
181 {
182 if( (item != mList->GetItemCount()-1) && (item != mList->GetItemCount()-2) )
183 { // can't move 'unnamed' down, or the one above it
184 state = mList->GetItemState(item+1, wxLIST_STATE_SELECTED);
185 if ( state != wxLIST_STATE_SELECTED )
186 { // swap this with one below but only if it isn't selected
187 EQCurve temp(wxT("temp"));
188 temp.Name = mEditCurves[item].Name;
189 temp.points = mEditCurves[item].points;
190 mEditCurves[item].Name = mEditCurves[item+1].Name;
191 mEditCurves[item].points = mEditCurves[item+1].points;
192 mEditCurves[item+1].Name = temp.Name;
193 mEditCurves[item+1].points = temp.points;
194 wxString sTemp = mList->GetItemText(item);
195 mList->SetItem(item, 0, mList->GetItemText(item+1));
196 mList->SetItem(item+1, 0, sTemp);
197 mList->SetItemState(item, 0, wxLIST_STATE_SELECTED);
198 mList->SetItemState(item+1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
199 }
200 }
201 item = GetPreviousItem(item);
202 }
203}
One curve in a list.

References GetPreviousItem(), mEditCurves, mList, EQCurve::Name, EQCurve::points, and wxT().

Here is the call graph for this function:

◆ OnExport()

void EqualizationCurvesDialog::OnExport ( wxCommandEvent &  event)
private

Definition at line 448 of file EqualizationCurvesDialog.cpp.

449{
450 FileDialogWrapper filePicker(this, XO("Export EQ curves as..."),
451 FileNames::DataDir(), wxT(""),
452 XMLtypes(),
453 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER); // wxFD_CHANGE_DIR?
454 wxString fileName;
455 if( filePicker.ShowModal() == wxID_CANCEL)
456 return;
457 else
458 fileName = filePicker.GetPath();
459
460 EQCurveArray exportCurves; // Copy selected curves to export
461 exportCurves.clear();
462 long item = mList->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
463 int i=0;
464 while(item >= 0)
465 {
466 if(item != mList->GetItemCount()-1) // not 'unnamed'
467 {
468 exportCurves.push_back(mEditCurves[item].Name);
469 exportCurves[i].points = mEditCurves[item].points;
470 i++;
471 }
472 else
474 XO("You cannot export 'unnamed' curve, it is special."),
475 XO("Cannot Export 'unnamed'") );
476 // get next selected item
477 item = mList->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
478 }
479 if(i>0)
480 {
481 EQCurveWriter{ exportCurves }.SaveCurves(fileName);
482 auto message = XO("%d curves exported to %s").Format( i, fileName );
484 message,
485 XO("Curves exported") );
486 }
487 else
489 XO("No curves exported"),
490 XO("No curves exported") );
491}
std::vector< EQCurve > EQCurveArray
static const FileNames::FileTypes & XMLtypes()
Serializer of curves into XML files.
void SaveCurves(const wxString &fileName={})
FILES_API FilePath DataDir()
Audacity user data directory.

References FileNames::DataDir(), EQUtils::DoMessageBox(), FileDialog::GetPath(), mEditCurves, mList, mName, EQCurveWriter::SaveCurves(), FileDialog::ShowModal(), wxT(), XMLtypes(), and XO().

Here is the call graph for this function:

◆ OnImport()

void EqualizationCurvesDialog::OnImport ( wxCommandEvent &  event)
private

Definition at line 431 of file EqualizationCurvesDialog.cpp.

432{
433 FileDialogWrapper filePicker(
434 this,
435 XO("Choose an EQ curve file"), FileNames::DataDir(), wxT(""),
436 XMLtypes() );
437 wxString fileName;
438 if( filePicker.ShowModal() == wxID_CANCEL)
439 return;
440 else
441 fileName = filePicker.GetPath();
443 .LoadCurves(fileName, true);
444 PopulateList(0); // update the EqualizationCurvesDialog dialog
445 return;
446}

References FileNames::DataDir(), FileDialog::GetPath(), mEditCurves, mName, mOptions, PopulateList(), FileDialog::ShowModal(), wxT(), XMLtypes(), and XO().

Here is the call graph for this function:

◆ OnLibrary()

void EqualizationCurvesDialog::OnLibrary ( wxCommandEvent &  event)
private

Definition at line 493 of file EqualizationCurvesDialog.cpp.

494{
495 // full path to wiki.
496 wxLaunchDefaultBrowser(wxT("https://wiki.audacityteam.org/wiki/EQCurvesDownload"));
497}

References wxT().

Here is the call graph for this function:

◆ OnListSelectionChange()

void EqualizationCurvesDialog::OnListSelectionChange ( wxListEvent &  event)
private

Definition at line 532 of file EqualizationCurvesDialog.cpp.

533{
534 const bool enable = mList->GetSelectedItemCount() > 0;
535 static const int ids[] = {
540 };
541 for (auto id : ids)
542 FindWindowById(id, this)->Enable(enable);
543}

References DeleteButtonID, DownButtonID, mList, RenameButtonID, and UpButtonID.

◆ OnOK()

void EqualizationCurvesDialog::OnOK ( wxCommandEvent &  event)
private

Definition at line 507 of file EqualizationCurvesDialog.cpp.

508{
509 {
510 // Make a backup of the current curves
511 wxString backupPlace =
512 wxFileName( FileNames::DataDir(), wxT("EQBackup.xml") ).GetFullPath();
513 EQCurveWriter writer{ mCurves };
514 writer.SaveCurves(backupPlace);
515 // Load back into the main dialog
517 // Save to default place
518 writer.SaveCurves();
519 } // scope of writer
520 EQCurveReader{ mCurves, mName, mOptions }.LoadCurves();
521
522 // Select something sensible
523 long item = mList->GetNextItem(-1,
524 wxLIST_NEXT_ALL,
525 wxLIST_STATE_SELECTED);
526 if (item == -1)
527 item = mList->GetItemCount()-1; // nothing selected, default to 'unnamed'
528 mItem = item;
529 EndModal(true);
530}

References FileNames::DataDir(), mCurves, mEditCurves, mItem, mList, mName, mOptions, and wxT().

Here is the call graph for this function:

◆ OnRename()

void EqualizationCurvesDialog::OnRename ( wxCommandEvent &  event)
private

Definition at line 219 of file EqualizationCurvesDialog.cpp.

220{
221 wxString name;
222 int numCurves = mEditCurves.size();
223 int curve = 0;
224
225 // Setup list of characters that aren't allowed
226 wxArrayStringEx exclude{
227 wxT("<") ,
228 wxT(">") ,
229 wxT("'") ,
230 wxT("\"") ,
231 };
232
233 // Get the first one to be renamed
234 long item = mList->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
235 long firstItem = item; // for reselection with PopulateList
236 while(item >= 0)
237 {
238 // Prompt the user until a valid name is enter or cancelled
239 bool overwrite = false;
240 bool bad = true;
241 while( bad ) // Check for an unacceptable duplicate
242 { // Show the dialog and bail if the user cancels
243 bad = false;
244 // build the dialog
245 AudacityTextEntryDialog dlg( this,
246 XO("Rename '%s' to...").Format( mEditCurves[ item ].Name ),
247 XO("Rename...") );
248 dlg.SetTextValidator( wxFILTER_EXCLUDE_CHAR_LIST );
249 dlg.SetName(
250 wxString::Format( _("Rename '%s'"), mEditCurves[ item ].Name ) );
251 wxTextValidator *tv = dlg.GetTextValidator();
252 tv->SetExcludes( exclude ); // Tell the validator about excluded chars
253 if( dlg.ShowModal() == wxID_CANCEL )
254 {
255 bad = true;
256 break;
257 }
258
259 // Extract the name from the dialog
260 name = dlg.GetValue();
261
262 // Search list of curves for a duplicate name
263 for( curve = 0; curve < numCurves; curve++ )
264 {
265 wxString temp = mEditCurves[ curve ].Name;
266 if( name == mEditCurves[ curve ].Name ) // case sensitive
267 {
268 bad = true;
269 if( curve == item ) // trying to rename a curve with the same name
270 {
272 XO("Name is the same as the original one"),
273 XO("Same name"),
274 wxOK );
275 break;
276 }
277 int answer = EQUtils::DoMessageBox(mName,
278 XO("Overwrite existing curve '%s'?").Format( name ),
279 XO("Curve exists"),
280 wxYES_NO);
281 if (answer == wxYES)
282 {
283 bad = false;
284 overwrite = true; // we are going to overwrite the one with this name
285 break;
286 }
287 }
288 }
289 if( name.empty() || name == wxT("unnamed") )
290 bad = true;
291 }
292
293 // if bad, we cancelled the rename dialog, so nothing to do.
294 if( bad == true )
295 ;
296 else if(overwrite){
297 // Overwrite another curve.
298 // JKC: because 'overwrite' is true, 'curve' is the number of the curve that
299 // we are about to overwrite.
300 mEditCurves[ curve ].Name = name;
301 mEditCurves[ curve ].points = mEditCurves[ item ].points;
302 // if renaming the unnamed item, then select it,
303 // otherwise get rid of the item we've renamed.
304 if( item == (numCurves-1) )
305 mList->SetItem(curve, 0, name);
306 else
307 {
308 mEditCurves.erase( mEditCurves.begin() + item );
309 numCurves--;
310 }
311 }
312 else if( item == (numCurves-1) ) // renaming 'unnamed'
313 { // Create a NEW entry
314 mEditCurves.push_back( EQCurve( wxT("unnamed") ) );
315 // Copy over the points
316 mEditCurves[ numCurves ].points = mEditCurves[ numCurves - 1 ].points;
317 // Give the original unnamed entry the NEW name
318 mEditCurves[ numCurves - 1 ].Name = name;
319 numCurves++;
320 }
321 else // just rename (the 'normal' case)
322 {
323 mEditCurves[ item ].Name = name;
324 mList->SetItem(item, 0, name);
325 }
326 // get next selected item
327 item = mList->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
328 }
329
330 PopulateList(firstItem); // Note: only saved to file when you OK out of the dialog
331 return;
332}
#define _(s)
Definition: Internat.h:73
Wrap wxTextEntryDialog so that caption IS translatable.
Abstract base class used in importing a file.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.

References _, EQUtils::DoMessageBox(), mEditCurves, mList, mName, name, PopulateList(), wxT(), and XO().

Here is the call graph for this function:

◆ OnUp()

void EqualizationCurvesDialog::OnUp ( wxCommandEvent &  event)
private

Definition at line 137 of file EqualizationCurvesDialog.cpp.

138{
139 long item = mList->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
140 if ( item == -1 )
141 return; // no items selected
142 if( item == 0 )
143 item = mList->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); // top item selected, can't move up
144 int state;
145 while( item != -1 )
146 {
147 if ( item == mList->GetItemCount()-1)
148 { // 'unnamed' always stays at the bottom
150 XO("'unnamed' always stays at the bottom of the list"),
151 XO("'unnamed' is special") ); // these could get tedious!
152 return;
153 }
154 state = mList->GetItemState(item-1, wxLIST_STATE_SELECTED);
155 if ( state != wxLIST_STATE_SELECTED )
156 { // swap this with one above but only if it isn't selected
157 EQCurve temp(wxT("temp"));
158 temp.Name = mEditCurves[item].Name;
159 temp.points = mEditCurves[item].points;
160 mEditCurves[item].Name = mEditCurves[item-1].Name;
161 mEditCurves[item].points = mEditCurves[item-1].points;
162 mEditCurves[item-1].Name = temp.Name;
163 mEditCurves[item-1].points = temp.points;
164 wxString sTemp = mList->GetItemText(item);
165 mList->SetItem(item, 0, mList->GetItemText(item-1));
166 mList->SetItem(item-1, 0, sTemp);
167 mList->SetItemState(item, 0, wxLIST_STATE_SELECTED);
168 mList->SetItemState(item-1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
169 }
170 item = mList->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
171 }
172}

References EQUtils::DoMessageBox(), mEditCurves, mList, mName, EQCurve::Name, EQCurve::points, wxT(), and XO().

Here is the call graph for this function:

◆ Populate()

void EqualizationCurvesDialog::Populate ( )
private

Creates the dialog and its contents.

Definition at line 64 of file EqualizationCurvesDialog.cpp.

65{
66 //------------------------- Main section --------------------
69 // ----------------------- End of main section --------------
70}
@ eIsCreating
Definition: ShuttleGui.h:37
#define S(N)
Definition: ToChars.cpp:64
void PopulateOrExchange(ShuttleGui &S)
Defines the dialog and does data exchange with it.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640

References eIsCreating, PopulateOrExchange(), and S.

Here is the call graph for this function:

◆ PopulateList()

void EqualizationCurvesDialog::PopulateList ( int  position)
private

Definition at line 110 of file EqualizationCurvesDialog.cpp.

111{
112 mList->DeleteAllItems();
113 for (unsigned int i = 0; i < mEditCurves.size(); i++)
114 mList->InsertItem(i, mEditCurves[i].Name);
115 mList->SetColumnWidth(0, wxLIST_AUTOSIZE);
116 int curvesWidth = mList->GetColumnWidth(0);
117 mList->SetColumnWidth(0, wxLIST_AUTOSIZE_USEHEADER);
118 int headerWidth = mList->GetColumnWidth(0);
119 mList->SetColumnWidth(0, wxMax(headerWidth, curvesWidth));
120 // use 'position' to set focus
121 mList->EnsureVisible(position);
122 mList->SetItemState(position, wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED, wxLIST_STATE_SELECTED|wxLIST_STATE_FOCUSED);
123}

References mEditCurves, and mList.

Referenced by OnDefaults(), OnDelete(), OnImport(), OnRename(), and PopulateOrExchange().

Here is the caller graph for this function:

◆ PopulateOrExchange()

void EqualizationCurvesDialog::PopulateOrExchange ( ShuttleGui S)
private

Defines the dialog and does data exchange with it.

Definition at line 73 of file EqualizationCurvesDialog.cpp.

74{
75 S.StartHorizontalLay(wxEXPAND);
76 {
77 S.StartStatic(XO("&Curves"), 1);
78 {
79 mList = S.Id(CurvesListID)
80 .Style( wxLC_REPORT | wxLC_HRULES | wxLC_VRULES )
81 .AddListControlReportMode({
82 { XO("Curve Name"), wxLIST_FORMAT_RIGHT }
83 });
84 }
85 S.EndStatic();
86 S.StartVerticalLay(0);
87 {
88 S.Id(UpButtonID).AddButton(XXO("Move &Up"), wxALIGN_LEFT);
89 S.Id(DownButtonID).AddButton(XXO("Move &Down"), wxALIGN_LEFT);
90 S.Id(RenameButtonID).AddButton(XXO("&Rename..."), wxALIGN_LEFT);
91 S.Id(DeleteButtonID).AddButton(XXO("D&elete..."), wxALIGN_LEFT);
92 S.Id(ImportButtonID).AddButton(XXO("I&mport..."), wxALIGN_LEFT);
93 S.Id(ExportButtonID).AddButton(XXO("E&xport..."), wxALIGN_LEFT);
94 S.Id(LibraryButtonID).AddButton(XXO("&Get More..."), wxALIGN_LEFT);
95 S.Id(DefaultsButtonID).AddButton(XXO("De&faults"), wxALIGN_LEFT);
96 }
97 S.EndVerticalLay();
98 }
99 S.EndHorizontalLay();
100 S.AddStandardButtons();
101 S.StartStatic(XO("Help"));
102 S.AddConstTextBox( {}, XO("Rename 'unnamed' to save a new entry.\n'OK' saves all changes, 'Cancel' doesn't."));
103 S.EndStatic();
105 Fit();
106
107 return;
108}
XXO("&Cut/Copy/Paste Toolbar")

References CurvesListID, DefaultsButtonID, DeleteButtonID, DownButtonID, ExportButtonID, ImportButtonID, LibraryButtonID, mList, mPosition, PopulateList(), RenameButtonID, S, UpButtonID, XO(), and XXO().

Referenced by Populate().

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

Member Data Documentation

◆ mCurves

EQCurveArray& EqualizationCurvesDialog::mCurves
private

Definition at line 49 of file EqualizationCurvesDialog.h.

Referenced by OnOK().

◆ mEditCurves

EQCurveArray EqualizationCurvesDialog::mEditCurves
private

◆ mItem

int EqualizationCurvesDialog::mItem { -1 }
private

Definition at line 54 of file EqualizationCurvesDialog.h.

Referenced by GetItem(), and OnOK().

◆ mList

wxListCtrl* EqualizationCurvesDialog::mList
private

◆ mName

const TranslatableString& EqualizationCurvesDialog::mName
private

Definition at line 47 of file EqualizationCurvesDialog.h.

Referenced by OnDefaults(), OnDelete(), OnExport(), OnImport(), OnOK(), OnRename(), and OnUp().

◆ mOptions

const int EqualizationCurvesDialog::mOptions
private

Definition at line 48 of file EqualizationCurvesDialog.h.

Referenced by OnDefaults(), OnImport(), and OnOK().

◆ mParent

wxWindow* EqualizationCurvesDialog::mParent
private

Definition at line 52 of file EqualizationCurvesDialog.h.

◆ mPosition

int EqualizationCurvesDialog::mPosition
private

Definition at line 53 of file EqualizationCurvesDialog.h.

Referenced by PopulateOrExchange().


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