-
Notifications
You must be signed in to change notification settings - Fork 3
/
KnobLineCoronaControl.h
36 lines (28 loc) · 1.07 KB
/
KnobLineCoronaControl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include "IControl.h"
class KnobLineCoronaControl : public IKnobLineControl
{
public:
KnobLineCoronaControl(IPlugBase* pPlug, IRECT pR, int paramIdx,
const IColor* pLineColor, const IColor* pCoronaColor,
float coronaThickness = 0.0f, double innerRadius = 0.0, double outerRadius = 0.0,
double minAngle = -0.75 * PI, double maxAngle = 0.75 * PI,
EDirection direction = kVertical, double gearing = DEFAULT_GEARING);
bool Draw(IGraphics* pGraphics) override;
void OnMouseDown(int x, int y, IMouseMod* pMod) override;
void OnMouseDrag(int x, int y, int dX, int dY, IMouseMod* pMod) override;
void OnMouseUp(int x, int y, IMouseMod* pMod) override;
void OnMouseOver(int x, int y, IMouseMod* pMod) override;
void OnMouseOut() override;
void SetLabelControl(ITextControl* control, bool bShared = false);
private:
void ShowLabel();
void HideLabel();
float mCX, mCY;
bool mHasMouse;
IColor mCoronaColor;
IChannelBlend mCoronaBlend;
ITextControl* mLabelControl;
WDL_String mLabelString;
bool mSharedLabel;
};