Browse Source

Minor tweaks to LookAndFeel, VST wrapper.

tags/2021-05-28
Julian Storer 15 years ago
parent
commit
38c64a7840
9 changed files with 32 additions and 21 deletions
  1. +10
    -9
      extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp
  2. +5
    -4
      juce_amalgamated.cpp
  3. +6
    -2
      juce_amalgamated.h
  4. +1
    -1
      src/core/juce_MathsFunctions.h
  5. +1
    -1
      src/gui/components/filebrowser/juce_FileListComponent.cpp
  6. +1
    -1
      src/gui/components/filebrowser/juce_FileTreeComponent.cpp
  7. +2
    -1
      src/gui/components/lookandfeel/juce_LookAndFeel.cpp
  8. +5
    -1
      src/gui/components/lookandfeel/juce_LookAndFeel.h
  9. +1
    -1
      src/text/juce_String.cpp

+ 10
- 9
extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp View File

@@ -439,6 +439,10 @@ public:
{
result = 1;
}
else if (strcmp (text, "openCloseAnyThread" == 0)
{
result = -1;
}
return result;
}
@@ -591,7 +595,7 @@ public:
{
if (outputs[j] == chan)
{
chan = (float*) juce_malloc (sizeof (float) * blockSize * 2);
chan = new float [blockSize * 2];
tempChannels.set (i, chan);
break;
}
@@ -1429,7 +1433,6 @@ private:
int numInChans, numOutChans;
HeapBlock <float*> channels;
Array<float*> tempChannels; // see note in processReplacing()
bool hasCreatedTempChannels;
bool shouldDeleteEditor;
//==============================================================================
@@ -1481,14 +1484,12 @@ private:
void deleteTempChannels()
{
for (int i = tempChannels.size(); --i >= 0;)
juce_free (tempChannels.getUnchecked(i));
delete[] (tempChannels.getUnchecked(i));
tempChannels.clear();
if (filter != 0)
tempChannels.insertMultiple (0, 0, filter->getNumInputChannels() + filter->getNumOutputChannels());
hasCreatedTempChannels = false;
}
const String getHostName()
@@ -1499,13 +1500,13 @@ private:
return host;
}
#if JUCE_MAC
#if JUCE_MAC
void* hostWindow;
#elif JUCE_LINUX
#elif JUCE_LINUX
Window hostWindow;
#else
#else
HWND hostWindow;
#endif
#endif
};
//==============================================================================


+ 5
- 4
juce_amalgamated.cpp View File

@@ -11774,7 +11774,7 @@ public:

static void copyChars (juce_wchar* const dest, const juce_wchar* const src, const size_t numChars) throw()
{
jassert (src != 0 & dest != 0);
jassert (src != 0 && dest != 0);
memcpy (dest, src, numChars * sizeof (juce_wchar));
dest [numChars] = 0;
}
@@ -59083,7 +59083,7 @@ public:
&icon,
fileSize, modTime,
isDirectory, highlighted,
index);
index, owner);
}

void mouseDown (const MouseEvent& e)
@@ -59825,7 +59825,7 @@ public:
file.getFileName(),
&icon, fileSize, modTime,
isDirectory, isSelected(),
indexInContentsList);
indexInContentsList, owner);
}

void itemClicked (const MouseEvent& e)
@@ -67444,7 +67444,8 @@ void LookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height,
const String& fileTimeDescription,
const bool isDirectory,
const bool isItemSelected,
const int /*itemIndex*/)
const int /*itemIndex*/,
DirectoryContentsDisplayComponent&)
{
if (isItemSelected)
g.fillAll (findColour (DirectoryContentsDisplayComponent::highlightColourId));


+ 6
- 2
juce_amalgamated.h View File

@@ -1125,7 +1125,7 @@ template <typename Type>
inline int numElementsInArray (Type& array)
{
(void) array; // (required to avoid a spurious warning in MS compilers)
return static_cast<int> (sizeof (array) / sizeof (array[0]));
return static_cast<int> (sizeof (array) / sizeof (0[array]));
}

// Some useful maths functions that aren't always present with all compilers and build settings.
@@ -55025,7 +55025,8 @@ public:
const String& fileTimeDescription,
bool isDirectory,
bool isItemSelected,
int itemIndex);
int itemIndex,
DirectoryContentsDisplayComponent& component);

virtual Button* createFileBrowserGoUpButton();

@@ -55350,6 +55351,9 @@ private:
bool flatOnTop,
bool flatOnBottom) throw();

// This has been deprecated - see the new parameter list..
virtual int drawFileBrowserRow (Graphics&, int, int, const String&, Image*, const String&, const String&, bool, bool, int) { return 0; }

LookAndFeel (const LookAndFeel&);
LookAndFeel& operator= (const LookAndFeel&);
};


+ 1
- 1
src/core/juce_MathsFunctions.h View File

@@ -176,7 +176,7 @@ template <typename Type>
inline int numElementsInArray (Type& array)
{
(void) array; // (required to avoid a spurious warning in MS compilers)
return static_cast<int> (sizeof (array) / sizeof (array[0]));
return static_cast<int> (sizeof (array) / sizeof (0[array]));
}
//==============================================================================


+ 1
- 1
src/gui/components/filebrowser/juce_FileListComponent.cpp View File

@@ -109,7 +109,7 @@ public:
&icon,
fileSize, modTime,
isDirectory, highlighted,
index);
index, owner);
}
void mouseDown (const MouseEvent& e)


+ 1
- 1
src/gui/components/filebrowser/juce_FileTreeComponent.cpp View File

@@ -153,7 +153,7 @@ public:
file.getFileName(),
&icon, fileSize, modTime,
isDirectory, isSelected(),
indexInContentsList);
indexInContentsList, owner);
}
void itemClicked (const MouseEvent& e)


+ 2
- 1
src/gui/components/lookandfeel/juce_LookAndFeel.cpp View File

@@ -2575,7 +2575,8 @@ void LookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height,
const String& fileTimeDescription,
const bool isDirectory,
const bool isItemSelected,
const int /*itemIndex*/)
const int /*itemIndex*/,
DirectoryContentsDisplayComponent&)
{
if (isItemSelected)
g.fillAll (findColour (DirectoryContentsDisplayComponent::highlightColourId));


+ 5
- 1
src/gui/components/lookandfeel/juce_LookAndFeel.h View File

@@ -309,7 +309,8 @@ public:
const String& fileTimeDescription,
bool isDirectory,
bool isItemSelected,
int itemIndex);
int itemIndex,
DirectoryContentsDisplayComponent& component);
virtual Button* createFileBrowserGoUpButton();
@@ -658,6 +659,9 @@ private:
bool flatOnTop,
bool flatOnBottom) throw();
// This has been deprecated - see the new parameter list..
virtual int drawFileBrowserRow (Graphics&, int, int, const String&, Image*, const String&, const String&, bool, bool, int) { return 0; }
LookAndFeel (const LookAndFeel&);
LookAndFeel& operator= (const LookAndFeel&);
};


+ 1
- 1
src/text/juce_String.cpp View File

@@ -137,7 +137,7 @@ public:
static void copyChars (juce_wchar* const dest, const juce_wchar* const src, const size_t numChars) throw()
{
jassert (src != 0 & dest != 0);
jassert (src != 0 && dest != 0);
memcpy (dest, src, numChars * sizeof (juce_wchar));
dest [numChars] = 0;
}


Loading…
Cancel
Save