40 for (
int i = components.
size(); --
i >= 0;)
44 if (
c->getComponentID() == compId)
54 if (
c.getComponentID() == compId)
57 for (
auto* child :
c.getChildren())
89 type->updateComponentFromState (changedComp, state);
96const Identifier ComponentBuilder::idProperty (
"id");
106 state.addListener (
this);
111 state.removeListener (
this);
154 type->builder =
this;
161 for (
int i = 0;
i <
types.size(); ++
i)
165 if (
t->type == targetType)
179 return types [index];
242 auto numExistingChildComps =
parent.getNumChildComponents();
251 for (
int i = 0;
i < numExistingChildComps; ++
i)
252 existingComponents.
add (
parent.getChildComponent (
i));
256 for (
int i = 0;
i < newNumChildren; ++
i)
259 auto*
c = removeComponentWithID (existingComponents, getStateId (childState));
270 componentsInOrder.
add (
c);
277 if (componentsInOrder.
size() > 0)
279 componentsInOrder.
getLast()->toFront (
false);
281 for (
int i = componentsInOrder.
size() - 1; --
i >= 0;)
#define noexcept
Definition DistrhoDefines.h:72
#define nullptr
Definition DistrhoDefines.h:75
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
Definition juce_Array.h:56
ElementType getUnchecked(int index) const
Definition juce_Array.h:252
void ensureStorageAllocated(int minNumElements)
Definition juce_Array.h:1065
int size() const noexcept
Definition juce_Array.h:215
void add(const ElementType &newElement)
Definition juce_Array.h:418
ElementType getLast() const noexcept
Definition juce_Array.h:300
Definition juce_ComponentBuilder.h:186
Definition juce_ComponentBuilder.h:101
ComponentBuilder * builder
Definition juce_ComponentBuilder.h:145
const Identifier type
Definition juce_ComponentBuilder.h:113
friend class ComponentBuilder
Definition juce_ComponentBuilder.h:144
ComponentBuilder * getBuilder() const noexcept
Definition juce_ComponentBuilder.cpp:231
virtual ~TypeHandler()
Definition juce_ComponentBuilder.cpp:227
TypeHandler(const Identifier &valueTreeType)
Definition juce_ComponentBuilder.cpp:222
Definition juce_ComponentBuilder.h:48
void valueTreeParentChanged(ValueTree &) override
Definition juce_ComponentBuilder.cpp:216
void valueTreePropertyChanged(ValueTree &, const Identifier &) override
Definition juce_ComponentBuilder.cpp:196
ComponentBuilder(const ValueTree &state)
Definition juce_ComponentBuilder.cpp:103
int getNumHandlers() const noexcept
Definition juce_ComponentBuilder.cpp:172
ValueTree state
Definition juce_ComponentBuilder.h:64
void registerStandardComponentTypes()
Definition juce_ComponentBuilder.cpp:182
void valueTreeChildOrderChanged(ValueTree &, int, int) override
Definition juce_ComponentBuilder.cpp:211
std::unique_ptr< Component > component
Definition juce_ComponentBuilder.h:232
ImageProvider * imageProvider
Definition juce_ComponentBuilder.h:233
OwnedArray< TypeHandler > types
Definition juce_ComponentBuilder.h:231
ImageProvider * getImageProvider() const noexcept
Definition juce_ComponentBuilder.cpp:191
void updateChildComponents(Component &parent, const ValueTree &children)
Definition juce_ComponentBuilder.cpp:238
void setImageProvider(ImageProvider *newImageProvider) noexcept
Definition juce_ComponentBuilder.cpp:186
TypeHandler * getHandler(int index) const noexcept
Definition juce_ComponentBuilder.cpp:177
static const Identifier idProperty
Definition juce_ComponentBuilder.h:227
~ComponentBuilder() override
Definition juce_ComponentBuilder.cpp:109
TypeHandler * getHandlerForState(const ValueTree &state) const
Definition juce_ComponentBuilder.cpp:157
Component * createComponent()
Definition juce_ComponentBuilder.cpp:134
void valueTreeChildRemoved(ValueTree &, ValueTree &, int) override
Definition juce_ComponentBuilder.cpp:206
Component * getManagedComponent()
Definition juce_ComponentBuilder.cpp:120
void registerTypeHandler(TypeHandler *type)
Definition juce_ComponentBuilder.cpp:145
void valueTreeChildAdded(ValueTree &, ValueTree &) override
Definition juce_ComponentBuilder.cpp:201
Definition juce_Component.h:36
Definition juce_Identifier.h:39
Definition juce_OwnedArray.h:51
int size() const noexcept
Definition juce_OwnedArray.h:130
ObjectClass * getUnchecked(int index) const noexcept
Definition juce_OwnedArray.h:160
ObjectClass * removeAndReturn(int indexToRemove)
Definition juce_OwnedArray.h:629
void ensureStorageAllocated(int minNumElements) noexcept
Definition juce_OwnedArray.h:788
ObjectClass * add(ObjectClass *newObject)
Definition juce_OwnedArray.h:294
Definition juce_String.h:53
bool isEmpty() const noexcept
Definition juce_String.h:310
bool isNotEmpty() const noexcept
Definition juce_String.h:316
Definition juce_ValueTree.h:72
ValueTree getChild(int index) const
Definition juce_ValueTree.cpp:854
int getNumChildren() const noexcept
Definition juce_ValueTree.cpp:849
bool isValid() const noexcept
Definition juce_ValueTree.h:174
ValueTree getParent() const noexcept
Definition juce_ValueTree.cpp:700
struct huft * t
Definition inflate.c:943
register unsigned i
Definition inflate.c:1575
unsigned s
Definition inflate.c:1555
static uintptr_t parent
Definition pugl.h:1644
Definition juce_ComponentBuilder.cpp:30
static Component * createNewComponent(ComponentBuilder::TypeHandler &type, const ValueTree &state, Component *parent)
Definition juce_ComponentBuilder.cpp:64
static Component * findComponentWithID(Component &c, const String &compId)
Definition juce_ComponentBuilder.cpp:51
static Component * removeComponentWithID(OwnedArray< Component > &components, const String &compId)
Definition juce_ComponentBuilder.cpp:36
static String getStateId(const ValueTree &state)
Definition juce_ComponentBuilder.cpp:31
static void updateComponent(ComponentBuilder &builder, const ValueTree &state)
Definition juce_ComponentBuilder.cpp:73
Definition carla_juce.cpp:31
@ tree
Definition juce_AccessibilityRole.h:58
return c
Definition crypt.c:175
#define const
Definition zconf.h:137