1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Add final specifiers in implementation files

This commit is contained in:
Tom Poole 2023-10-06 13:08:34 +01:00
parent aee5a3a45e
commit 6bf9bb9a2e
315 changed files with 1031 additions and 1025 deletions

View file

@ -148,7 +148,7 @@ public:
{
transportSource = newSource;
struct ResetCallback : public CallbackMessage
struct ResetCallback final : public CallbackMessage
{
ResetCallback (AudioThumbnailComponent& o) : owner (o) {}
void messageCallback() override { owner.reset(); }

View file

@ -233,8 +233,8 @@ public:
private:
//==============================================================================
struct MidiDeviceListBox : private ListBoxModel,
public ListBox
struct MidiDeviceListBox final : private ListBoxModel,
public ListBox
{
MidiDeviceListBox (const String& name,
MidiDemo& contentComponent,

View file

@ -1,7 +1,7 @@
#include "MainComponent.h"
//==============================================================================
class GuiAppApplication : public juce::JUCEApplication
class GuiAppApplication final : public juce::JUCEApplication
{
public:
//==============================================================================
@ -51,7 +51,7 @@ public:
This class implements the desktop window that contains an instance of
our MainComponent class.
*/
class MainWindow : public juce::DocumentWindow
class MainWindow final : public juce::DocumentWindow
{
public:
explicit MainWindow (juce::String name)

View file

@ -148,7 +148,7 @@ public:
{
transportSource = newSource;
struct ResetCallback : public CallbackMessage
struct ResetCallback final : public CallbackMessage
{
ResetCallback (AudioThumbnailComponent& o) : owner (o) {}
void messageCallback() override { owner.reset(); }

View file

@ -27,7 +27,7 @@
//==============================================================================
class IntroScreen : public Component
class IntroScreen final : public Component
{
public:
IntroScreen()
@ -70,8 +70,8 @@ private:
HyperlinkButton linkButton { "www.juce.com", { "http://www.juce.com" } };
//==============================================================================
struct LogoDrawComponent : public Component,
private Timer
struct LogoDrawComponent final : public Component,
private Timer
{
LogoDrawComponent()
{

View file

@ -28,7 +28,7 @@
#include "MainComponent.h"
//==============================================================================
struct DemoContent : public Component
struct DemoContent final : public Component
{
DemoContent() noexcept {}
@ -58,7 +58,7 @@ private:
//==============================================================================
#if ! (JUCE_ANDROID || JUCE_IOS)
struct CodeContent : public Component
struct CodeContent final : public Component
{
CodeContent()
{

View file

@ -32,7 +32,7 @@ struct DemoContent;
struct CodeContent;
//==============================================================================
class DemoContentComponent : public TabbedComponent
class DemoContentComponent final : public TabbedComponent
{
public:
DemoContentComponent (Component& mainComponent, std::function<void (bool)> demoChangedCallback);

View file

@ -26,7 +26,7 @@
#include "MainComponent.h"
//==============================================================================
struct SidePanelHeader : public Component
struct SidePanelHeader final : public Component
{
SidePanelHeader (MainComponent& o)
: owner (o)
@ -132,8 +132,8 @@ struct SidePanelHeader : public Component
};
//==============================================================================
class DemoList : public Component,
public ListBoxModel
class DemoList final : public Component,
public ListBoxModel
{
public:
DemoList (DemoContentComponent& holder)
@ -214,7 +214,7 @@ public:
private:
//==============================================================================
class CategoryListHeaderComponent : public Button
class CategoryListHeaderComponent final : public Button
{
public:
explicit CategoryListHeaderComponent (DemoList& o)

View file

@ -29,7 +29,7 @@
#include "DemoContentComponent.h"
//==============================================================================
class MainComponent : public Component
class MainComponent final : public Component
{
public:
//==============================================================================

View file

@ -28,7 +28,7 @@
#include "MainComponent.h"
//==============================================================================
class SettingsContent : public Component
class SettingsContent final : public Component
{
public:
SettingsContent (MainComponent& topLevelComponent)
@ -67,8 +67,8 @@ private:
static constexpr int itemHeight = 30;
static constexpr int itemSpacing = 7;
class GraphicsSettingsGroup : public Component,
private ComponentMovementWatcher
class GraphicsSettingsGroup final : public Component,
private ComponentMovementWatcher
{
public:
GraphicsSettingsGroup (MainComponent& comp)
@ -179,7 +179,7 @@ private:
OwnedArray<LookAndFeel> lookAndFeels;
};
class AudioSettingsGroup : public Component
class AudioSettingsGroup final : public Component
{
public:
AudioSettingsGroup()
@ -211,7 +211,7 @@ private:
};
//==============================================================================
class InnerContent : public Component
class InnerContent final : public Component
{
public:
InnerContent (MainComponent& mainComponent)

View file

@ -339,7 +339,7 @@ private:
{
RootItem()
{
struct Item : public TreeViewItem
struct Item final : public TreeViewItem
{
Item (int index, int depth, int numSubItems)
: textToDisplay ("Item " + String (index)
@ -511,7 +511,7 @@ private:
and accessibility clients. This derived class represents the properties
set via the demo UI.
*/
struct CustomAccessibilityHandler : public AccessibilityHandler
struct CustomAccessibilityHandler final : public AccessibilityHandler
{
explicit CustomAccessibilityHandler (CustomWidgetComponent& comp)
: AccessibilityHandler (comp.accessibleComponent,
@ -821,7 +821,7 @@ private:
std::unique_ptr<AccessibilityValueInterface> getValueInterface()
{
struct Numeric : public AccessibilityNumericValueInterface
struct Numeric final : public AccessibilityNumericValueInterface
{
explicit Numeric (ValueInterfaceComponent& o)
: owner (o)
@ -835,7 +835,7 @@ private:
ValueInterfaceComponent& owner;
};
struct Ranged : public AccessibilityRangedNumericValueInterface
struct Ranged final : public AccessibilityRangedNumericValueInterface
{
explicit Ranged (ValueInterfaceComponent& o)
: owner (o)
@ -857,7 +857,7 @@ private:
ValueInterfaceComponent& owner;
};
struct Text : public AccessibilityTextValueInterface
struct Text final : public AccessibilityTextValueInterface
{
explicit Text (ValueInterfaceComponent& o)
: owner (o)

View file

@ -98,7 +98,7 @@ public:
private:
std::unique_ptr<Component> content;
struct CornerDragger : public Component
struct CornerDragger final : public Component
{
CornerDragger()
{

View file

@ -646,7 +646,7 @@ struct OpenGLUtils
String name;
};
struct DynamicTexture : public DemoTexture
struct DynamicTexture final : public DemoTexture
{
DynamicTexture() { name = "Dynamically-generated texture"; }
@ -693,7 +693,7 @@ struct OpenGLUtils
return image;
}
struct BuiltInTexture : public DemoTexture
struct BuiltInTexture final : public DemoTexture
{
BuiltInTexture (const char* nm, const void* imageData, size_t imageSize)
: image (resizeImageToPowerOfTwo (ImageFileFormat::loadFrom (imageData, imageSize)))
@ -710,7 +710,7 @@ struct OpenGLUtils
}
};
struct TextureFromFile : public DemoTexture
struct TextureFromFile final : public DemoTexture
{
TextureFromFile (const File& file)
{
@ -727,7 +727,7 @@ struct OpenGLUtils
}
};
struct TextureFromAsset : public DemoTexture
struct TextureFromAsset final : public DemoTexture
{
TextureFromAsset (const char* assetName)
{
@ -749,9 +749,9 @@ struct OpenGLUtils
/** This is the main demo component - the GL context gets attached to it, and
it implements the OpenGLRenderer callback so that it can do real GL work.
*/
class OpenGLDemo : public Component,
private OpenGLRenderer,
private AsyncUpdater
class OpenGLDemo final : public Component,
private OpenGLRenderer,
private AsyncUpdater
{
public:
OpenGLDemo()
@ -982,10 +982,10 @@ private:
This component sits on top of the main GL demo, and contains all the sliders
and widgets that control things.
*/
class DemoControlsOverlay : public Component,
private CodeDocument::Listener,
private Slider::Listener,
private Timer
class DemoControlsOverlay final : public Component,
private CodeDocument::Listener,
private Slider::Listener,
private Timer
{
public:
DemoControlsOverlay (OpenGLDemo& d)

View file

@ -611,7 +611,7 @@ struct MenuPage final : public Component
addAndMakeVisible (customItemButton);
customItemButton.onClick = [&]
{
struct CustomComponent : public PopupMenu::CustomComponent
struct CustomComponent final : public PopupMenu::CustomComponent
{
CustomComponent (int widthIn, int heightIn, Colour backgroundIn)
: PopupMenu::CustomComponent (false),
@ -925,7 +925,7 @@ private:
// Demonstrates how to put a custom component into a toolbar - this one contains
// a ComboBox.
class CustomToolbarComboBox : public ToolbarItemComponent
class CustomToolbarComboBox final : public ToolbarItemComponent
{
public:
CustomToolbarComboBox (const int toolbarItemId)
@ -1161,7 +1161,7 @@ private:
//==============================================================================
// This is a custom Label component, which we use for the table's editable text columns.
class EditableTextCustomComponent : public Label
class EditableTextCustomComponent final : public Label
{
public:
EditableTextCustomComponent (TableDemoComponent& td) : owner (td)
@ -1209,7 +1209,7 @@ private:
//==============================================================================
// This is a custom component containing a combo box, which we're going to put inside
// our table's "rating" column.
class RatingColumnCustomComponent : public Component
class RatingColumnCustomComponent final : public Component
{
public:
RatingColumnCustomComponent (TableDemoComponent& td) : owner (td)
@ -1328,7 +1328,7 @@ public:
private:
//==============================================================================
struct SourceItemListboxContents : public ListBoxModel
struct SourceItemListboxContents final : public ListBoxModel
{
// The following methods implement the necessary virtual functions from ListBoxModel,
// telling the listbox how many rows there are, painting them, etc.
@ -1366,10 +1366,10 @@ private:
//==============================================================================
// and this is a component that can have things dropped onto it..
class DragAndDropDemoTarget : public Component,
public DragAndDropTarget,
public FileDragAndDropTarget,
public TextDragAndDropTarget
class DragAndDropDemoTarget final : public Component,
public DragAndDropTarget,
public FileDragAndDropTarget,
public TextDragAndDropTarget
{
public:
DragAndDropDemoTarget() {}
@ -1530,7 +1530,7 @@ struct DemoTabbedComponent final : public TabbedComponent
// This is a small star button that is put inside one of the tabs. You can
// use this technique to create things like "close tab" buttons, etc.
class CustomTabButton : public Component
class CustomTabButton final : public Component
{
public:
CustomTabButton (bool isRunningComponenTransformsDemo)

View file

@ -442,8 +442,8 @@ private:
}), true);
}
class AlertWindowCustomComponent : public Component,
private Slider::Listener
class AlertWindowCustomComponent final : public Component,
private Slider::Listener
{
public:
AlertWindowCustomComponent()

View file

@ -1705,7 +1705,7 @@ private:
}
private:
struct ComboWithItems : public ComboBox
struct ComboWithItems final : public ComboBox
{
explicit ComboWithItems (RangedAudioParameter& param)
{

View file

@ -231,7 +231,7 @@ private:
TextEditor testResultsBox;
struct LogMessage : public Message
struct LogMessage final : public Message
{
LogMessage (const String& m) : message (m) {}
@ -343,7 +343,7 @@ inline bool invokeChildProcessDemo (const String& commandLine)
void shutdown() override { mainWindow = nullptr; }
private:
class MainWindow : public DocumentWindow
class MainWindow final : public DocumentWindow
{
public:
MainWindow (const String& name, std::unique_ptr<Component> c)

View file

@ -1087,7 +1087,7 @@ private:
#endif
}
struct ParamsView : public Component
struct ParamsView final : public Component
{
ParamsView()
{