This class provides some handy utility methods for creating ModalComponentManager::Callback objects that will invoke a static function with some parameters when a modal component is dismissed. More...
#include <juce_ModalComponentManager.h>
Static Public Member Functions | |
template<typename CallbackFn > | |
static ModalComponentManager::Callback * | create (CallbackFn &&fn) |
This is a utility function to create a ModalComponentManager::Callback that will call a callable object. More... | |
template<typename ParamType > | |
static ModalComponentManager::Callback * | create (void(*functionToCall)(int, ParamType), ParamType parameterValue) |
This is a utility function to create a ModalComponentManager::Callback that will call a static function with a parameter. More... | |
template<class ComponentType > | |
static ModalComponentManager::Callback * | forComponent (void(*functionToCall)(int, ComponentType *), ComponentType *component) |
This is a utility function to create a ModalComponentManager::Callback that will call a static function with a component. More... | |
template<class ComponentType , typename ParamType > | |
static ModalComponentManager::Callback * | forComponent (void(*functionToCall)(int, ComponentType *, ParamType), ComponentType *component, ParamType param) |
Creates a ModalComponentManager::Callback that will call a static function with a component. More... | |
template<typename ParamType1 , typename ParamType2 > | |
static ModalComponentManager::Callback * | withParam (void(*functionToCall)(int, ParamType1, ParamType2), ParamType1 parameterValue1, ParamType2 parameterValue2) |
This is a utility function to create a ModalComponentManager::Callback that will call a static function with two custom parameters. More... | |
Private Member Functions | |
ModalCallbackFunction ()=delete | |
~ModalCallbackFunction ()=delete | |
This class provides some handy utility methods for creating ModalComponentManager::Callback objects that will invoke a static function with some parameters when a modal component is dismissed.
@tags{GUI}
|
privatedelete |
|
privatedelete |
|
inlinestatic |
This is a utility function to create a ModalComponentManager::Callback that will call a callable object.
The function that you supply must take an integer parameter, which is the result code that was returned when the modal component was dismissed.
References juce::gl::f, juce::NullCheckedInvocation::invoke(), and juce::gl::result.
|
inlinestatic |
This is a utility function to create a ModalComponentManager::Callback that will call a static function with a parameter.
The function that you supply must take two parameters - the first being an int, which is the result code that was used when the modal component was dismissed, and the second can be a custom type. Note that this custom value will be copied and stored, so it must be a primitive type or a class that provides copy-by-value semantics.
E.g.
References juce::gl::r.
|
inlinestatic |
This is a utility function to create a ModalComponentManager::Callback that will call a static function with a component.
The function that you supply must take two parameters - the first being an int, which is the result code that was used when the modal component was dismissed, and the second can be a Component class. The component will be stored as a WeakReference, so that if it gets deleted before this callback is invoked, the pointer that is passed to the function will be null.
E.g.
References juce::gl::r.
Referenced by juce::StandaloneFilterWindow::buttonClicked().
|
inlinestatic |
Creates a ModalComponentManager::Callback that will call a static function with a component.
The function that you supply must take three parameters - the first being an int, which is the result code that was used when the modal component was dismissed, the second being a Component class, and the third being a custom type (which must be a primitive type or have copy-by-value semantics). The component will be stored as a WeakReference, so that if it gets deleted before this callback is invoked, the pointer that is passed into the function will be null.
E.g.
References juce::gl::param, and juce::gl::r.
|
inlinestatic |
This is a utility function to create a ModalComponentManager::Callback that will call a static function with two custom parameters.
The function that you supply must take three parameters - the first being an int, which is the result code that was used when the modal component was dismissed, and the next two are your custom types. Note that these custom values will be copied and stored, so they must be primitive types or classes that provide copy-by-value semantics.
E.g.
References juce::gl::r.