Loading...
Searching...
No Matches
juce::NativeScaleFactorNotifier Class Reference

Detailed Description

Calls a function every time the native scale factor of a component's peer changes.

This is used in the VST and VST3 wrappers to ensure that the editor's scale is kept in sync with the scale of its containing component.

Inheritance diagram for juce::NativeScaleFactorNotifier:

Public Member Functions

 NativeScaleFactorNotifier (Component *comp, std::function< void(float)> onScaleChanged)
 Constructs an instance.
 ~NativeScaleFactorNotifier () override

Constructors and Destructors

◆ NativeScaleFactorNotifier()

juce::NativeScaleFactorNotifier::NativeScaleFactorNotifier ( Component * comp,
std::function< void(float)> onScaleChanged )

Constructs an instance.

While the instance is alive, it will listen for changes to the scale factor of the comp's peer, and will call onScaleChanged whenever this scale factor changes.

Parameters
compThe component to observe
onScaleChangedA function that will be called when the backing scale factor changes

◆ ~NativeScaleFactorNotifier()

juce::NativeScaleFactorNotifier::~NativeScaleFactorNotifier ( )
override
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram