21 #include "IPlugStructs.h" 24 BEGIN_IGRAPHICS_NAMESPACE
28 template <
int MAXNC = 1,
int MAXBUF = 128>
60 const float maxY = (r.
H() / 2.f);
62 float xPerData = r.
W() / (float) MAXBUF;
64 for (
int c = 0; c < mBuf.nChans; c++)
67 float yHi = mBuf.vals[c][0] * maxY;
68 yHi =
Clip(yHi, -maxY, maxY);
71 for (
int s = 1; s < MAXBUF; s++)
73 xHi = ((float) s * xPerData);
74 yHi = mBuf.vals[c][s] * maxY;
75 yHi =
Clip(yHi, -maxY, maxY);
96 pos = stream.
Get(&mBuf, pos);
104 float mPadding = 2.f;
107 END_IGRAPHICS_NAMESPACE
int Get(T *pDst, int startPos) const
Get arbitary typed data from the stream.
virtual void PathMoveTo(float x, float y)=0
Move the current point in the current path.
void OnMsgFromDelegate(int msgTag, int dataSize, const void *pData) override
Implement to receive messages sent to the control, see IEditorDelegate:SendControlMsgFromDelegate() ...
The lowest level base class of an IGraphics control.
Used to manage a rectangular area, independent of draw class/platform.
IVScopeControl(const IRECT &bounds, const char *label="", const IVStyle &style=DEFAULT_STYLE)
Constructs an IVScopeControl.
virtual void DrawRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f)
Draw a rectangle to the graphics context.
virtual void DrawBackground(IGraphics &g, const IRECT &rect)
Draw the IVControl background (usually transparent)
virtual void PathLineTo(float x, float y)=0
Add a line to the current path from the current point to the specified location.
virtual void PathStroke(const IPattern &pattern, float thickness, const IStrokeOptions &options=IStrokeOptions(), const IBlend *pBlend=0)=0
Stroke the current current path.
Used to manage stroke behaviour for path based drawing back ends.
ISender is a utility class which can be used to defer data from the realtime audio processing and sen...
void AttachIControl(IControl *pControl, const char *label)
Call in the constructor of your IVControl to link the IVectorBase and IControl.
This file contains the base IControl implementation, along with some base classes for specific types ...
Manages a non-owned block of memory, for receiving arbitrary message byte streams.
ISenderData is used to represent a typed data packet, that may contain values for multiple channels...
IRECT MakeRects(const IRECT &parent, bool hasHandle=false)
Calculate the rectangles for the various areas, depending on the style.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
const IColor & GetColor(EVColor color) const
Get value of a specific EVColor in the IVControl.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
The lowest level base class of an IGraphics context.
virtual void DrawLabel(IGraphics &g)
Draw the IVControl label text.
BEGIN_IPLUG_NAMESPACE T Clip(T x, T lo, T hi)
Clips the value x between lo and hi.
void DrawHorizontalLine(const IColor &color, const IRECT &bounds, float y, const IBlend *pBlend=0, float thickness=1.f)
Draw a horizontal line, within a rectangular region of the graphics context.
void SetTargetRECT(const IRECT &bounds)
Set the rectangular mouse tracking target area, within the graphics context for this control...
float L
Left side of the rectangle (X)
ISender is a utility class which can be used to defer data from the realtime audio processing and sen...
Vectorial multi-channel capable oscilloscope control.
IRECT GetPadded(float padding) const
Get a copy of this IRECT with each value padded by padding N.B.
A base interface to be combined with IControl for vectorial controls "IVControls", in order for them to share a common style If you need more flexibility, you're on your own!
A struct encapsulating a set of properties used to configure IVControls.
virtual void SetDirty(bool triggerAction=true, int valIdx=kNoValIdx)
Mark the control as dirty, i.e.