JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::NativeScaleFactorNotifier Class Reference

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

#include "juce_NativeScaleFactorNotifier.h"

Inheritance diagram for juce::NativeScaleFactorNotifier:
juce::ComponentMovementWatcher juce::ComponentPeer::ScaleFactorListener

Public Member Functions

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

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.

@tags{GUI}

Definition at line 37 of file juce_NativeScaleFactorNotifier.h.

Constructor & Destructor Documentation

◆ 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

Definition at line 35 of file juce_NativeScaleFactorNotifier.cpp.

◆ ~NativeScaleFactorNotifier()

juce::NativeScaleFactorNotifier::~NativeScaleFactorNotifier ( )
override

Definition at line 42 of file juce_NativeScaleFactorNotifier.cpp.


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