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

Introjucer: fix for binary data file generation when no images are present.

This commit is contained in:
jules 2012-06-25 16:07:58 +01:00
parent 44b9f93564
commit 1fd27d7ed6
6 changed files with 9 additions and 34 deletions

View file

@ -1129,7 +1129,7 @@ const char* jucer_WindowTemplate_h = (const char*) temp_613d4455;
const char* getNamedResource (const char*, int&) throw();
const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw()
{
int hash = 0;
unsigned int hash = 0;
if (resourceNameUTF8 != 0)
while (*resourceNameUTF8 != 0)
hash = 31 * hash + *resourceNameUTF8++;

View file

@ -191,19 +191,20 @@ bool ResourceFile::write (const File& cppFile, OutputStream& cpp, OutputStream&
<< newLine
<< "}" << newLine;
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 << " // 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
<< newLine
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
<< newLine
<< " juce::Image getImageForIdentifier (const juce::var& imageIdentifier)" << newLine
<< " {" << newLine
<< " int dataSize = 0;" << newLine

View file

@ -305,20 +305,6 @@ String RolloverHelpComp::findTip (Component* c)
return String::empty;
}
//==============================================================================
PropertyPanelWithTooltips::PropertyPanelWithTooltips()
{
addAndMakeVisible (&panel);
addAndMakeVisible (&rollover);
}
void PropertyPanelWithTooltips::resized()
{
panel.setBounds (0, 0, getWidth(), jmax (getHeight() - 60, proportionOfHeight (0.6f)));
rollover.setBounds (3, panel.getBottom() - 50, getWidth() - 6,
getHeight() - (panel.getBottom() - 50) - 4);
}
//==============================================================================
FloatingLabelComponent::FloatingLabelComponent()
: font (10.0f)

View file

@ -74,18 +74,6 @@ private:
static String findTip (Component*);
};
//==============================================================================
class PropertyPanelWithTooltips : public Component
{
public:
PropertyPanelWithTooltips();
void resized();
PropertyPanel panel;
RolloverHelpComp rollover;
};
//==============================================================================
class PropertyListBuilder
{

View file

@ -2145,7 +2145,7 @@ const char* treedemo_xml = (const char*) temp_816ae700;
const char* getNamedResource (const char*, int&) throw();
const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw()
{
int hash = 0;
unsigned int hash = 0;
if (resourceNameUTF8 != 0)
while (*resourceNameUTF8 != 0)
hash = 31 * hash + *resourceNameUTF8++;

View file

@ -512,7 +512,7 @@ const char* prefs_misc_png = (const char*) temp_2dcb70c7;
const char* getNamedResource (const char*, int&) throw();
const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw()
{
int hash = 0;
unsigned int hash = 0;
if (resourceNameUTF8 != 0)
while (*resourceNameUTF8 != 0)
hash = 31 * hash + *resourceNameUTF8++;