1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

Cleaned out some defunct ComponentBuilder code.

This commit is contained in:
jules 2012-07-26 15:32:34 +01:00
parent 00ff36f0e6
commit e3537ba57a
37 changed files with 34 additions and 608 deletions

View file

@ -193,34 +193,8 @@ bool ResourceFile::write (const File& cppFile, OutputStream& cpp, OutputStream&
header << " // If you provide the name of one of the binary resource variables above, this function will" << newLine
<< " // return the corresponding data and its size (or a null pointer if the name isn't found)." << newLine
<< " const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw();" << newLine;
if (containsAnyImages)
{
header << newLine
<< " //==============================================================================" << newLine
<< " // This class acts as an ImageProvider that will access the BinaryData images" << newLine
<< " class ImageProvider : public juce::ComponentBuilder::ImageProvider" << newLine
<< " {" << newLine
<< " public:" << newLine
<< " ImageProvider() noexcept {}" << newLine
<< newLine
<< " juce::Image getImageForIdentifier (const juce::var& imageIdentifier)" << newLine
<< " {" << newLine
<< " int dataSize = 0;" << newLine
<< " const char* const data = getNamedResource (imageIdentifier.toString().toUTF8(), dataSize);" << newLine
<< newLine
<< " if (data != nullptr)" << newLine
<< " return juce::ImageCache::getFromMemory (data, dataSize);" << newLine
<< newLine
<< " return juce::Image();" << newLine
<< " }" << newLine
<< newLine
<< " juce::var getIdentifierForImage (const juce::Image&) { return juce::var(); }" << newLine
<< " };" << newLine;
}
header << "}" << newLine;
<< " const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw();" << newLine
<< "}" << newLine;
return true;
}