2
0
Fork 0
OPL/Source/iOSPluginEditorWrapper/ScrollbarManager.h
George Reales 03b6d2c2ef v1.8
Parameter exposure (AU/iOS AUv3/VST/VST3) for host automation.
iOS Universal build with iPhone support.
Enhanced AUv3 GUI window display fit.
AUv3 GUI scrolling using left and right border sides.
2020-09-14 11:02:19 +02:00

44 lines
936 B
C++

/*
=============================================================================
ScrollbarManager.
Created: 1 Jul 2020 2:59:58a
Author: discoDSP
=============================================================================
*/
#pragma once
#include "JuceHeader.h"
/**
* This enables/disables the scrollbar if the user clicks inside the area of a constraint
* */
class ScrollbarManager : public MouseListener
{
public:
ScrollbarManager(Viewport& vp);
~ScrollbarManager();
virtual void mouseDown(const MouseEvent& event) override;
virtual void mouseUp(const MouseEvent& event) override;
void addConstraint(int initialX, int initialY, int width, int height);
void removeAllConstraints();
void scrollEnabled(bool);
private:
Viewport& viewport;
std::vector<Rectangle<int>> constraints;
};