Ejemplo n.º 1
0
SObjectSounds CObjectClassesHandler::getObjectSounds(si32 type, si32 subtype) const
{
	if(knownSubObjects(type).count(subtype))
		return getHandlerFor(type, subtype)->getSounds();
	else
		return getObjectSounds(type);
}
Ejemplo n.º 2
0
std::string CObjectClassesHandler::getObjectName(si32 type, si32 subtype) const
{
	if (knownSubObjects(type).count(subtype))
	{
		auto name = getHandlerFor(type, subtype)->getCustomName();
		if (name)
			return name.get();
	}
	return getObjectName(type);
}
Component* ComponentTypeHandler::createCopyOf (JucerDocument* document, Component& existing)
{
    jassert (getHandlerFor (existing) == this);

    Component* const newOne = createNewComponent (document);
    ScopedPointer<XmlElement> xml (createXmlFor (&existing, document->getComponentLayout()));

    if (xml != nullptr)
        restoreFromXml (*xml, newOne, document->getComponentLayout());

    return newOne;
}
Ejemplo n.º 4
0
Component* ComponentTypeHandler::createCopyOf (JucerDocument* document, Component& existing)
{
    jassert (getHandlerFor (existing) == this);

    Component* const newOne = createNewComponent (document);
    XmlElement* const xml = createXmlFor (&existing, document->getComponentLayout());

    if (xml != 0)
    {
        restoreFromXml (*xml, newOne, document->getComponentLayout());
        delete xml;
    }

    return newOne;
}
Ejemplo n.º 5
0
TObjectTypeHandler CObjectClassesHandler::getHandlerFor(CompoundMapObjectID compoundIdentifier) const
{
	return getHandlerFor(compoundIdentifier.primaryID, compoundIdentifier.secondaryID);
}