@@ -364,7 +364,6 @@ class TESTABLE ControlPanel : public Component,
364
364
void setRecordingDirectoryBaseText (String text);
365
365
366
366
/* * Gets the name of the current recording directory (including prepend and append text)
367
-
368
367
Returns an empty string if recording has not been started yet.
369
368
*/
370
369
String getRecordingDirectoryName ();
@@ -417,9 +416,9 @@ class TESTABLE ControlPanel : public Component,
417
416
/* * Updates button colours when colour theme changes */
418
417
void updateColours ();
419
418
419
+ /* * Pointers to owned components */
420
420
std::unique_ptr<FilenameEditorButton> filenameText;
421
421
std::unique_ptr<FilenameConfigWindow> filenameConfigWindow;
422
-
423
422
std::unique_ptr<Clock> clock;
424
423
425
424
private:
@@ -432,11 +431,32 @@ class TESTABLE ControlPanel : public Component,
432
431
/* * Generates the next recording directory based on field settings **/
433
432
String generateFilenameFromFields (bool usePlaceholderText);
434
433
435
- bool hasRecorded;
436
- bool forceRecording;
434
+ /* Called by popup window for editing recording filename fields */
435
+ void componentBeingDeleted (Component& component);
436
+
437
+ /* * Draws the control panel background */
438
+ void paint (Graphics& g);
437
439
438
- std::unique_ptr<PlayButton> playButton;
440
+ /* * Sets sub-component bounds */
441
+ void resized ();
442
+
443
+ /* * Respond to button clicks */
444
+ void buttonClicked (Button* button);
439
445
446
+ /* * Respond to ComboBox changes */
447
+ void comboBoxChanged (ComboBox* combo);
448
+
449
+ /* * Controls timing of meter animations */
450
+ void timerCallback ();
451
+
452
+ /* * Updates the values displayed by the CPUMeter and DiskSpaceMeter.*/
453
+ void refreshMeters ();
454
+
455
+ /* * Draws the boundaries around the FilenameComponent.*/
456
+ void createPaths ();
457
+
458
+ /* * Pointers to owned components */
459
+ std::unique_ptr<PlayButton> playButton;
440
460
std::unique_ptr<CPUMeter> cpuMeter;
441
461
std::unique_ptr<DiskSpaceMeter> diskMeter;
442
462
std::unique_ptr<FilenameComponent> filenameComponent;
@@ -445,47 +465,28 @@ class TESTABLE ControlPanel : public Component,
445
465
std::unique_ptr<CustomArrowButton> showHideRecordingOptionsButton;
446
466
std::unique_ptr<RecordButton> recordButton;
447
467
std::unique_ptr<ComboBox> recordSelector;
448
-
449
468
Array<std::shared_ptr<FilenameFieldComponent>> filenameFields;
469
+ OwnedArray<RecordEngineManager> recordEngines;
470
+ std::unique_ptr<UtilityButton> recordOptionsButton;
450
471
451
- /* Popup window for editing recording filename fields */
452
- void componentBeingDeleted (Component& component);
453
-
472
+ /* * Pointers to non-owned components */
454
473
ProcessorGraph* graph;
455
474
AudioComponent* audio;
456
475
AudioEditor* audioEditor;
457
476
458
- void paint (Graphics& g);
459
-
460
- void resized ();
461
-
462
- void paintButton (Graphics& g);
463
- void buttonClicked (Button* button);
464
-
465
- void comboBoxChanged (ComboBox* combo);
466
-
467
- bool initialize;
477
+ /* * Internal state variables */
478
+ bool initialize = true ;
468
479
bool isConsoleApp;
469
-
470
- void timerCallback ();
471
-
472
- /* * Updates the values displayed by the CPUMeter and DiskSpaceMeter.*/
473
- void refreshMeters ();
474
-
475
- bool keyPressed (const KeyPress& key);
476
-
477
- bool open;
480
+ bool open = false ;
481
+ bool hasRecorded = false ;
482
+ bool forceRecording = false ;
483
+ int lastEngineIndex = -1 ;
478
484
479
485
Path p1, p2;
480
486
481
- /* * Draws the boundaries around the FilenameComponent.*/
482
- void createPaths ();
483
-
484
487
String recordingDirectoryName;
485
488
486
- OwnedArray<RecordEngineManager> recordEngines;
487
- std::unique_ptr<UtilityButton> recordOptionsButton;
488
- int lastEngineIndex;
489
+
489
490
};
490
491
491
492
#endif // __CONTROLPANEL_H_AD81E528__
0 commit comments