Loading...
Searching...
No Matches
juce::ComponentBuilder::ImageProvider Class Referenceabstract

## Detailed Description

This class is used when references to images need to be stored in ValueTrees.

An instance of an ImageProvider provides a mechanism for converting an Image to/from a reference, which may be a file, URL, ID string, or whatever system is appropriate in your app.

When you're loading components from a ValueTree that may need a way of loading images, you should call ComponentBuilder::setImageProvider() to supply a suitable provider before trying to load the component.

See also
  ComponentBuilder::setImageProvider()

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

- juce_gui_basics/layout/juce_ComponentBuilder.h

## Public Member Functions

| ImageProvider ()=default
virtual | ~ImageProvider ()=default
virtual Image | getImageForIdentifier (const var &imageIdentifier)=0
| Retrieves the image associated with this identifier, which could be any kind of string, number, filename, etc.
virtual var | getIdentifierForImage (const Image &image)=0
| Returns an identifier to be used to refer to a given image.

## Constructors and Destructors

## ImageProvider()

juce::ComponentBuilder::ImageProvider::ImageProvider | ( |  | ) |

default

## ~ImageProvider()

virtual juce::ComponentBuilder::ImageProvider::~ImageProvider | ( |  | ) |

virtual default

## Member Functions

## getImageForIdentifier()

virtual Image juce::ComponentBuilder::ImageProvider::getImageForIdentifier | ( | const var & | imageIdentifier | ) |

pure virtual

Retrieves the image associated with this identifier, which could be any kind of string, number, filename, etc.

The image that is returned will be owned by the caller, but it may come from the ImageCache.

## getIdentifierForImage()

virtual var juce::ComponentBuilder::ImageProvider::getIdentifierForImage | ( | const Image & | image | ) |

pure virtual

Returns an identifier to be used to refer to a given image.

This is used when a reference to an image is stored in a ValueTree.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited