diff --git a/data/copy-juce-carla b/data/copy-juce-carla index df6dba3f6..76f4efb8f 100755 --- a/data/copy-juce-carla +++ b/data/copy-juce-carla @@ -2,8 +2,8 @@ set -e -JUCE_MODULES_DIR="/home/falktx/FOSS/GIT-mine/DISTRHO/libs/juce/source/modules/" -CARLA_MODULES_DIR="/home/falktx/FOSS/GIT-mine/Carla/source/modules/" +JUCE_MODULES_DIR="/home/falktx/Personal/FOSS/GIT/distrho/DISTRHO/libs/juce/source/modules/" +CARLA_MODULES_DIR="/home/falktx/Personal/FOSS/GIT/falktx/Carla/source/modules/" MODULES=("juce_audio_basics juce_audio_devices juce_audio_formats juce_audio_processors juce_core juce_data_structures juce_events juce_graphics juce_gui_basics juce_gui_extra") diff --git a/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp b/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp index 1880b27db..819184e9a 100644 --- a/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp +++ b/source/modules/juce_audio_basics/buffers/juce_FloatVectorOperations.cpp @@ -229,7 +229,7 @@ namespace FloatVectorHelpers static Type findMinOrMax (const Type* src, int num, const bool isMinimum) noexcept { - const int numLongOps = num / Mode::numParallel; + int numLongOps = num / Mode::numParallel; #if JUCE_USE_SSE_INTRINSICS if (numLongOps > 1 && isSSE2Available()) @@ -246,7 +246,7 @@ namespace FloatVectorHelpers if (isMinimum) { - for (int i = 1; i < numLongOps; ++i) + while (--numLongOps > 0) { src += Mode::numParallel; val = Mode::min (val, Mode::loadA (src)); @@ -254,7 +254,7 @@ namespace FloatVectorHelpers } else { - for (int i = 1; i < numLongOps; ++i) + while (--numLongOps > 0) { src += Mode::numParallel; val = Mode::max (val, Mode::loadA (src)); @@ -268,7 +268,7 @@ namespace FloatVectorHelpers if (isMinimum) { - for (int i = 1; i < numLongOps; ++i) + while (--numLongOps > 0) { src += Mode::numParallel; val = Mode::min (val, Mode::loadU (src)); @@ -276,7 +276,7 @@ namespace FloatVectorHelpers } else { - for (int i = 1; i < numLongOps; ++i) + while (--numLongOps > 0) { src += Mode::numParallel; val = Mode::max (val, Mode::loadU (src)); @@ -288,6 +288,7 @@ namespace FloatVectorHelpers : Mode::max (val); num &= (Mode::numParallel - 1); + src += Mode::numParallel; for (int i = 0; i < num; ++i) result = isMinimum ? jmin (result, src[i]) @@ -302,7 +303,7 @@ namespace FloatVectorHelpers static Range findMinAndMax (const Type* src, int num) noexcept { - const int numLongOps = num / Mode::numParallel; + int numLongOps = num / Mode::numParallel; #if JUCE_USE_SSE_INTRINSICS if (numLongOps > 1 && isSSE2Available()) @@ -318,7 +319,7 @@ namespace FloatVectorHelpers mn = Mode::loadA (src); mx = mn; - for (int i = 1; i < numLongOps; ++i) + while (--numLongOps > 0) { src += Mode::numParallel; const ParallelType v = Mode::loadA (src); @@ -332,7 +333,7 @@ namespace FloatVectorHelpers mn = Mode::loadU (src); mx = mn; - for (int i = 1; i < numLongOps; ++i) + while (--numLongOps > 0) { src += Mode::numParallel; const ParallelType v = Mode::loadU (src); @@ -345,6 +346,8 @@ namespace FloatVectorHelpers Mode::max (mx)); num &= 3; + src += Mode::numParallel; + for (int i = 0; i < num; ++i) result = result.getUnionWith (src[i]); diff --git a/source/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/source/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 97d958be2..4dfd4f817 100644 --- a/source/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/source/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1758,7 +1758,7 @@ private: //============================================================================== VST3ModuleHandle::Ptr module; - friend class VST3HostContext; + friend VST3HostContext; ComSmartPtr host; // Information objects: diff --git a/source/modules/juce_core/juce_core.h b/source/modules/juce_core/juce_core.h index 557c529e0..94960647d 100644 --- a/source/modules/juce_core/juce_core.h +++ b/source/modules/juce_core/juce_core.h @@ -272,6 +272,7 @@ extern JUCE_API void JUCE_CALLTYPE logAssertion (const char* file, int line) noe #include "zip/juce_GZIPDecompressorInputStream.h" #include "zip/juce_ZipFile.h" #include "containers/juce_PropertySet.h" +#include "memory/juce_SharedResourcePointer.h" } diff --git a/source/modules/juce_core/memory/juce_ReferenceCountedObject.h b/source/modules/juce_core/memory/juce_ReferenceCountedObject.h index 4243f4aa0..6464d8572 100644 --- a/source/modules/juce_core/memory/juce_ReferenceCountedObject.h +++ b/source/modules/juce_core/memory/juce_ReferenceCountedObject.h @@ -329,17 +329,17 @@ public: //============================================================================== /** Returns the object that this pointer references. - The pointer returned may be zero, of course. + The pointer returned may be null, of course. */ operator ReferencedType*() const noexcept { return referencedObject; } /** Returns the object that this pointer references. - The pointer returned may be zero, of course. + The pointer returned may be null, of course. */ ReferencedType* get() const noexcept { return referencedObject; } /** Returns the object that this pointer references. - The pointer returned may be zero, of course. + The pointer returned may be null, of course. */ ReferencedType* getObject() const noexcept { return referencedObject; } diff --git a/source/modules/juce_core/native/juce_win32_ComSmartPtr.h b/source/modules/juce_core/native/juce_win32_ComSmartPtr.h index c89a58de4..0dc0efc20 100644 --- a/source/modules/juce_core/native/juce_win32_ComSmartPtr.h +++ b/source/modules/juce_core/native/juce_win32_ComSmartPtr.h @@ -29,7 +29,7 @@ #ifndef JUCE_WIN32_COMSMARTPTR_H_INCLUDED #define JUCE_WIN32_COMSMARTPTR_H_INCLUDED -#if ! defined (_MSC_VER) //|| defined (__uuidof)) +#if ! (defined (_MSC_VER) || defined (__uuidof)) template struct UUIDGetter { static CLSID get() { jassertfalse; return CLSID(); } }; #define __uuidof(x) UUIDGetter::get() #endif diff --git a/source/modules/juce_graphics/native/juce_RenderingHelpers.h b/source/modules/juce_graphics/native/juce_RenderingHelpers.h index 01fa812fd..533d0027a 100644 --- a/source/modules/juce_graphics/native/juce_RenderingHelpers.h +++ b/source/modules/juce_graphics/native/juce_RenderingHelpers.h @@ -890,20 +890,22 @@ namespace EdgeTableFillers forcedinline void copyRow (DestPixelType* dest, SrcPixelType const* src, int width) const noexcept { - if (srcData.pixelStride == 3 && destData.pixelStride == 3) + const int destStride = destData.pixelStride; + const int srcStride = srcData.pixelStride; + + if (destStride == srcStride + && srcData.pixelFormat == Image::RGB + && destData.pixelFormat == Image::RGB) { - memcpy (dest, src, sizeof (PixelRGB) * (size_t) width); + memcpy (dest, src, (size_t) (width * srcStride)); } else { - const int destStride = destData.pixelStride; - const int srcStride = srcData.pixelStride; - do { dest->blend (*src); dest = addBytesToPointer (dest, destStride); - src = addBytesToPointer (src, srcStride); + src = addBytesToPointer (src, srcStride); } while (--width > 0); } } diff --git a/source/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp b/source/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp index 2b17e0d05..e4356b724 100644 --- a/source/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp +++ b/source/modules/juce_graphics/native/juce_win32_Direct2DGraphicsContext.cpp @@ -37,10 +37,9 @@ public: D2D1_RENDER_TARGET_PROPERTIES props = D2D1::RenderTargetProperties(); D2D1_HWND_RENDER_TARGET_PROPERTIES propsHwnd = D2D1::HwndRenderTargetProperties (hwnd, size); - const Direct2DFactories& factories = Direct2DFactories::getInstance(); - if (factories.d2dFactory != nullptr) + if (factories->d2dFactory != nullptr) { - HRESULT hr = factories.d2dFactory->CreateHwndRenderTarget (props, propsHwnd, renderingTarget.resetAndGetPointerAddress()); + HRESULT hr = factories->d2dFactory->CreateHwndRenderTarget (props, propsHwnd, renderingTarget.resetAndGetPointerAddress()); jassert (SUCCEEDED (hr)); (void) hr; hr = renderingTarget->CreateSolidColorBrush (D2D1::ColorF::ColorF (0.0f, 0.0f, 0.0f, 1.0f), colourBrush.resetAndGetPointerAddress()); } @@ -287,9 +286,8 @@ public: { renderingTarget->SetTransform (transformToMatrix (currentState->transform)); - const Direct2DFactories& factories = Direct2DFactories::getInstance(); - DirectWriteTypeLayout::drawToD2DContext (text, area, renderingTarget, factories.directWriteFactory, - factories.d2dFactory, factories.systemFonts); + DirectWriteTypeLayout::drawToD2DContext (text, area, renderingTarget, factories->directWriteFactory, + factories->d2dFactory, factories->systemFonts); renderingTarget->SetTransform (D2D1::IdentityMatrix()); return true; @@ -695,6 +693,7 @@ public: //============================================================================== private: + SharedResourcePointer factories; HWND hwnd; ComSmartPtr renderingTarget; ComSmartPtr colourBrush; @@ -733,7 +732,7 @@ private: static ID2D1PathGeometry* rectListToPathGeometry (const RectangleList& clipRegion) { ID2D1PathGeometry* p = nullptr; - Direct2DFactories::getInstance().d2dFactory->CreatePathGeometry (&p); + factories->d2dFactory->CreatePathGeometry (&p); ComSmartPtr sink; HRESULT hr = p->Open (sink.resetAndGetPointerAddress()); // xxx handle error @@ -811,7 +810,7 @@ private: static ID2D1PathGeometry* pathToPathGeometry (const Path& path, const AffineTransform& transform) { ID2D1PathGeometry* p = nullptr; - Direct2DFactories::getInstance().d2dFactory->CreatePathGeometry (&p); + factories->d2dFactory->CreatePathGeometry (&p); ComSmartPtr sink; HRESULT hr = p->Open (sink.resetAndGetPointerAddress()); diff --git a/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp b/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp index d8ca0bd72..89ab8f6bc 100644 --- a/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp +++ b/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp @@ -389,9 +389,9 @@ namespace DirectWriteTypeLayout bool TextLayout::createNativeLayout (const AttributedString& text) { #if JUCE_USE_DIRECTWRITE - const Direct2DFactories& factories = Direct2DFactories::getInstance(); + SharedResourcePointer factories; - if (factories.d2dFactory != nullptr && factories.systemFonts != nullptr) + if (factories->d2dFactory != nullptr && factories->systemFonts != nullptr) { #if JUCE_64BIT // There's a mysterious bug in 64-bit Windows that causes garbage floating-point @@ -402,13 +402,13 @@ bool TextLayout::createNativeLayout (const AttributedString& text) { hasBeenCalled = true; TextLayout dummy; - DirectWriteTypeLayout::createLayout (dummy, text, factories.directWriteFactory, - factories.d2dFactory, factories.systemFonts); + DirectWriteTypeLayout::createLayout (dummy, text, factories->directWriteFactory, + factories->d2dFactory, factories->systemFonts); } #endif - DirectWriteTypeLayout::createLayout (*this, text, factories.directWriteFactory, - factories.d2dFactory, factories.systemFonts); + DirectWriteTypeLayout::createLayout (*this, text, factories->directWriteFactory, + factories->d2dFactory, factories->systemFonts); return true; } #else diff --git a/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp b/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp index 74b767c1a..72401421a 100644 --- a/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp +++ b/source/modules/juce_graphics/native/juce_win32_DirectWriteTypeface.cpp @@ -107,15 +107,9 @@ public: systemFonts = nullptr; } - static const Direct2DFactories& getInstance() - { - static Direct2DFactories instance; - return instance; - } - - ComSmartPtr d2dFactory; - ComSmartPtr directWriteFactory; - ComSmartPtr systemFonts; + ComSmartPtr d2dFactory; + ComSmartPtr directWriteFactory; + ComSmartPtr systemFonts; private: DynamicLibrary direct2dDll, directWriteDll; @@ -255,6 +249,7 @@ public: IDWriteFontFace* getIDWriteFontFace() const noexcept { return dwFontFace; } private: + SharedResourcePointer factories; ComSmartPtr dwFontFace; float unitsToHeightScaleFactor, heightToPointsFactor, ascent; int designUnitsPerEm; diff --git a/source/modules/juce_graphics/native/juce_win32_Fonts.cpp b/source/modules/juce_graphics/native/juce_win32_Fonts.cpp index 090ac9ff2..ab5dbe8a2 100644 --- a/source/modules/juce_graphics/native/juce_win32_Fonts.cpp +++ b/source/modules/juce_graphics/native/juce_win32_Fonts.cpp @@ -176,17 +176,17 @@ StringArray Font::findAllTypefaceNames() StringArray results; #if JUCE_USE_DIRECTWRITE - const Direct2DFactories& factories = Direct2DFactories::getInstance(); + SharedResourcePointer factories; - if (factories.systemFonts != nullptr) + if (factories->systemFonts != nullptr) { ComSmartPtr fontFamily; uint32 fontFamilyCount = 0; - fontFamilyCount = factories.systemFonts->GetFontFamilyCount(); + fontFamilyCount = factories->systemFonts->GetFontFamilyCount(); for (uint32 i = 0; i < fontFamilyCount; ++i) { - HRESULT hr = factories.systemFonts->GetFontFamily (i, fontFamily.resetAndGetPointerAddress()); + HRESULT hr = factories->systemFonts->GetFontFamily (i, fontFamily.resetAndGetPointerAddress()); if (SUCCEEDED (hr)) results.addIfNotAlreadyThere (getFontFamilyName (fontFamily)); @@ -226,20 +226,20 @@ StringArray Font::findAllTypefaceStyles (const String& family) StringArray results; #if JUCE_USE_DIRECTWRITE - const Direct2DFactories& factories = Direct2DFactories::getInstance(); + SharedResourcePointer factories; - if (factories.systemFonts != nullptr) + if (factories->systemFonts != nullptr) { BOOL fontFound = false; uint32 fontIndex = 0; - HRESULT hr = factories.systemFonts->FindFamilyName (family.toWideCharPointer(), &fontIndex, &fontFound); + HRESULT hr = factories->systemFonts->FindFamilyName (family.toWideCharPointer(), &fontIndex, &fontFound); if (! fontFound) fontIndex = 0; // Get the font family using the search results // Fonts like: Times New Roman, Times New Roman Bold, Times New Roman Italic are all in the same font family ComSmartPtr fontFamily; - hr = factories.systemFonts->GetFontFamily (fontIndex, fontFamily.resetAndGetPointerAddress()); + hr = factories->systemFonts->GetFontFamily (fontIndex, fontFamily.resetAndGetPointerAddress()); // Get the font faces ComSmartPtr dwFont; @@ -619,11 +619,11 @@ const MAT2 WindowsTypeface::identityMatrix = { { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0 Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font) { #if JUCE_USE_DIRECTWRITE - const Direct2DFactories& factories = Direct2DFactories::getInstance(); + SharedResourcePointer factories; - if (factories.systemFonts != nullptr) + if (factories->systemFonts != nullptr) { - ScopedPointer wtf (new WindowsDirectWriteTypeface (font, factories.systemFonts)); + ScopedPointer wtf (new WindowsDirectWriteTypeface (font, factories->systemFonts)); if (wtf->loadedOk()) return wtf.release(); diff --git a/source/modules/juce_gui_basics/layout/juce_Viewport.cpp b/source/modules/juce_gui_basics/layout/juce_Viewport.cpp index d4d0e7297..04064ed90 100644 --- a/source/modules/juce_gui_basics/layout/juce_Viewport.cpp +++ b/source/modules/juce_gui_basics/layout/juce_Viewport.cpp @@ -30,6 +30,8 @@ Viewport::Viewport (const String& name) showHScrollbar (true), showVScrollbar (true), deleteContent (true), + allowScrollingWithoutScrollbarV (false), + allowScrollingWithoutScrollbarH (false), verticalScrollBar (true), horizontalScrollBar (false) { @@ -234,31 +236,23 @@ void Viewport::updateVisibleArea() Point visibleOrigin (-contentBounds.getPosition()); - if (hBarVisible) - { - horizontalScrollBar.setBounds (0, contentArea.getHeight(), contentArea.getWidth(), scrollbarWidth); - horizontalScrollBar.setRangeLimits (0.0, contentBounds.getWidth()); - horizontalScrollBar.setCurrentRange (visibleOrigin.x, contentArea.getWidth()); - horizontalScrollBar.setSingleStepSize (singleStepX); - horizontalScrollBar.cancelPendingUpdate(); - } - else if (canShowHBar) - { + horizontalScrollBar.setBounds (0, contentArea.getHeight(), contentArea.getWidth(), scrollbarWidth); + horizontalScrollBar.setRangeLimits (0.0, contentBounds.getWidth()); + horizontalScrollBar.setCurrentRange (visibleOrigin.x, contentArea.getWidth()); + horizontalScrollBar.setSingleStepSize (singleStepX); + horizontalScrollBar.cancelPendingUpdate(); + + if (canShowHBar && ! hBarVisible) visibleOrigin.setX (0); - } - if (vBarVisible) - { - verticalScrollBar.setBounds (contentArea.getWidth(), 0, scrollbarWidth, contentArea.getHeight()); - verticalScrollBar.setRangeLimits (0.0, contentBounds.getHeight()); - verticalScrollBar.setCurrentRange (visibleOrigin.y, contentArea.getHeight()); - verticalScrollBar.setSingleStepSize (singleStepY); - verticalScrollBar.cancelPendingUpdate(); - } - else if (canShowVBar) - { + verticalScrollBar.setBounds (contentArea.getWidth(), 0, scrollbarWidth, contentArea.getHeight()); + verticalScrollBar.setRangeLimits (0.0, contentBounds.getHeight()); + verticalScrollBar.setCurrentRange (visibleOrigin.y, contentArea.getHeight()); + verticalScrollBar.setSingleStepSize (singleStepY); + verticalScrollBar.cancelPendingUpdate(); + + if (canShowVBar && ! vBarVisible) visibleOrigin.setY (0); - } // Force the visibility *after* setting the ranges to avoid flicker caused by edge conditions in the numbers. horizontalScrollBar.setVisible (hBarVisible); @@ -301,8 +295,13 @@ void Viewport::setSingleStepSizes (const int stepX, const int stepY) } void Viewport::setScrollBarsShown (const bool showVerticalScrollbarIfNeeded, - const bool showHorizontalScrollbarIfNeeded) + const bool showHorizontalScrollbarIfNeeded, + const bool allowVerticalScrollingWithoutScrollbar, + const bool allowHorizontalScrollingWithoutScrollbar) { + allowScrollingWithoutScrollbarV = allowVerticalScrollingWithoutScrollbar; + allowScrollingWithoutScrollbarH = allowHorizontalScrollingWithoutScrollbar; + if (showVScrollbar != showVerticalScrollbarIfNeeded || showHScrollbar != showHorizontalScrollbarIfNeeded) { @@ -347,47 +346,44 @@ void Viewport::mouseWheelMove (const MouseEvent& e, const MouseWheelDetails& whe Component::mouseWheelMove (e, wheel); } +static float rescaleMouseWheelDistance (float distance, int singleStepSize) noexcept +{ + if (distance == 0) + return 0; + + distance *= 14.0f * singleStepSize; + + return distance < 0 ? jmin (distance, -1.0f) + : jmax (distance, 1.0f); +} + bool Viewport::useMouseWheelMoveIfNeeded (const MouseEvent& e, const MouseWheelDetails& wheel) { if (! (e.mods.isAltDown() || e.mods.isCtrlDown() || e.mods.isCommandDown())) { - const bool hasVertBar = verticalScrollBar.isVisible(); - const bool hasHorzBar = horizontalScrollBar.isVisible(); + const bool canScrollVert = (allowScrollingWithoutScrollbarV || verticalScrollBar.isVisible()); + const bool canScrollHorz = (allowScrollingWithoutScrollbarH || horizontalScrollBar.isVisible()); - if (hasHorzBar || hasVertBar) + if (canScrollHorz || canScrollVert) { - float wheelIncrementX = wheel.deltaX; - float wheelIncrementY = wheel.deltaY; - - if (wheelIncrementX != 0) - { - wheelIncrementX *= 14.0f * singleStepX; - wheelIncrementX = (wheelIncrementX < 0) ? jmin (wheelIncrementX, -1.0f) - : jmax (wheelIncrementX, 1.0f); - } - - if (wheelIncrementY != 0) - { - wheelIncrementY *= 14.0f * singleStepY; - wheelIncrementY = (wheelIncrementY < 0) ? jmin (wheelIncrementY, -1.0f) - : jmax (wheelIncrementY, 1.0f); - } + float wheelIncrementX = rescaleMouseWheelDistance (wheel.deltaX, singleStepX); + float wheelIncrementY = rescaleMouseWheelDistance (wheel.deltaY, singleStepY); Point pos (getViewPosition()); - if (wheelIncrementX != 0 && wheelIncrementY != 0 && hasHorzBar && hasVertBar) + if (wheelIncrementX != 0 && wheelIncrementY != 0 && canScrollHorz && canScrollVert) { pos.setX (pos.x - roundToInt (wheelIncrementX)); pos.setY (pos.y - roundToInt (wheelIncrementY)); } - else if (hasHorzBar && (wheelIncrementX != 0 || e.mods.isShiftDown() || ! hasVertBar)) + else if (canScrollHorz && (wheelIncrementX != 0 || e.mods.isShiftDown() || ! canScrollVert)) { - if (wheelIncrementX == 0 && ! hasVertBar) + if (wheelIncrementX == 0 && ! canScrollVert) wheelIncrementX = wheelIncrementY; pos.setX (pos.x - roundToInt (wheelIncrementX)); } - else if (hasVertBar && wheelIncrementY != 0) + else if (canScrollVert && wheelIncrementY != 0) { pos.setY (pos.y - roundToInt (wheelIncrementY)); } diff --git a/source/modules/juce_gui_basics/layout/juce_Viewport.h b/source/modules/juce_gui_basics/layout/juce_Viewport.h index f67b6b06b..baeb42a72 100644 --- a/source/modules/juce_gui_basics/layout/juce_Viewport.h +++ b/source/modules/juce_gui_basics/layout/juce_Viewport.h @@ -191,9 +191,15 @@ public: If set to false, the scrollbars won't ever appear. When true (the default) they will appear only when needed. + + The allowVerticalScrollingWithoutScrollbar parameters allow you to enable + mouse-wheel scrolling even when there the scrollbars are hidden. When the + scrollbars are visible, these parameters are ignored. */ void setScrollBarsShown (bool showVerticalScrollbarIfNeeded, - bool showHorizontalScrollbarIfNeeded); + bool showHorizontalScrollbarIfNeeded, + bool allowVerticalScrollingWithoutScrollbar = false, + bool allowHorizontalScrollingWithoutScrollbar = false); /** True if the vertical scrollbar is enabled. @see setScrollBarsShown @@ -258,9 +264,9 @@ private: int scrollBarThickness; int singleStepX, singleStepY; bool showHScrollbar, showVScrollbar, deleteContent; + bool allowScrollingWithoutScrollbarV, allowScrollingWithoutScrollbarH; Component contentHolder; - ScrollBar verticalScrollBar; - ScrollBar horizontalScrollBar; + ScrollBar verticalScrollBar, horizontalScrollBar; Point viewportPosToCompPos (Point) const; void updateVisibleArea(); diff --git a/source/modules/juce_gui_extra/misc/juce_ColourSelector.h b/source/modules/juce_gui_extra/misc/juce_ColourSelector.h index a661801f1..2e256bd8d 100644 --- a/source/modules/juce_gui_extra/misc/juce_ColourSelector.h +++ b/source/modules/juce_gui_extra/misc/juce_ColourSelector.h @@ -62,7 +62,7 @@ public: gapAroundColourSpaceComponent indicates how much of a gap to put around the colourspace and hue selector components. */ - ColourSelector (int sectionsToShow = (showAlphaChannel | showColourAtTop | showSliders | showColourspace), + ColourSelector (int flags = (showAlphaChannel | showColourAtTop | showSliders | showColourspace), int edgeGap = 4, int gapAroundColourSpaceComponent = 7); @@ -79,8 +79,7 @@ public: */ Colour getCurrentColour() const; - /** Changes the colour that is currently being shown. - */ + /** Changes the colour that is currently being shown. */ void setCurrentColour (Colour newColour); //============================================================================== diff --git a/source/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm b/source/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm index b31eb8616..b7e814d56 100644 --- a/source/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm +++ b/source/modules/juce_gui_extra/native/juce_mac_NSViewComponent.mm @@ -22,7 +22,6 @@ ============================================================================== */ - struct NSViewResizeWatcher { NSViewResizeWatcher() : callback (nil) {}