The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.7KB

  1. /* =========================================================================================
  2. This is an auto-generated file, created by The Introjucer 3.0.0
  3. Do not edit anything in this file!
  4. */
  5. namespace BinaryData
  6. {
  7. extern const char* cello_wav;
  8. const int cello_wavSize = 46348;
  9. extern const char* demo_table_data_xml;
  10. const int demo_table_data_xmlSize = 5239;
  11. extern const char* icons_zip;
  12. const int icons_zipSize = 83876;
  13. extern const char* juce_png;
  14. const int juce_pngSize = 15290;
  15. extern const char* treedemo_xml;
  16. const int treedemo_xmlSize = 1126;
  17. // If you provide the name of one of the binary resource variables above, this function will
  18. // return the corresponding data and its size (or a null pointer if the name isn't found).
  19. const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes) throw();
  20. //==============================================================================
  21. // This class acts as an ImageProvider that will access the BinaryData images
  22. class ImageProvider : public juce::ComponentBuilder::ImageProvider
  23. {
  24. public:
  25. ImageProvider() noexcept {}
  26. juce::Image getImageForIdentifier (const juce::var& imageIdentifier)
  27. {
  28. int dataSize = 0;
  29. const char* const data = getNamedResource (imageIdentifier.toString().toUTF8(), dataSize);
  30. if (data != nullptr)
  31. return juce::ImageCache::getFromMemory (data, dataSize);
  32. return juce::Image();
  33. }
  34. juce::var getIdentifierForImage (const juce::Image&) { return juce::var(); }
  35. };
  36. }