#include <juce_gui_basics.h>
The class is a base class for objects that manage the loading of a type of component from a ValueTree.
To store and re-load a tree of components as a ValueTree, each component type must have a TypeHandler to represent it.
- See also
- ComponentBuilder::registerTypeHandler(), Drawable::registerDrawableTypeHandlers()
◆ TypeHandler()
ComponentBuilder::TypeHandler::TypeHandler |
( |
const Identifier & |
valueTreeType | ) |
|
|
explicit |
Creates a TypeHandler. The valueTreeType must be the type name of the ValueTrees that this handler can parse.
◆ ~TypeHandler()
ComponentBuilder::TypeHandler::~TypeHandler |
( |
| ) |
|
|
virtual |
◆ addNewComponentFromState()
This method must create a new component from the given state, add it to the specified parent component (which may be null), and return it.
The ValueTree will have been pre-checked to make sure that its type matches the type that this handler supports.
There's no need to set the new Component's ID to match that of the state - the builder will take care of that itself.
Implemented in juce::DrawableTypeHandler< DrawableClass >.
◆ getBuilder()
Returns the builder that this type is registered with.
◆ updateComponentFromState()
virtual void juce::ComponentBuilder::TypeHandler::updateComponentFromState |
( |
Component * |
component, |
|
|
const ValueTree & |
state |
|
) |
| |
|
pure virtual |
◆ ComponentBuilder
◆ type
const Identifier juce::ComponentBuilder::TypeHandler::type |
Returns the type of the ValueTrees that this handler can parse.
The documentation for this class was generated from the following files: