32BEGIN_IGRAPHICS_NAMESPACE
39#pragma mark - Vector Controls
46 IVLabelControl(
const IRECT& bounds,
const char* label,
const IVStyle& style = DEFAULT_STYLE.WithDrawFrame(
false).WithColor(kSH, COLOR_BLACK).WithShadowOffset(1).WithValueText(DEFAULT_VALUE_TEXT.WithSize(20.f).WithFGColor(COLOR_WHITE)));
67 bool IsHit(
float x,
float y)
const override;
76 IVSwitchControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
bool valueInButton =
true);
83 bool IsHit(
float x,
float y)
const override;
84 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
93 IVToggleControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
const char* offText =
"OFF",
const char* onText =
"ON");
108 IVSlideSwitchControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
bool valueInButton =
false, EDirection direction = EDirection::Horizontal);
110 IVSlideSwitchControl(
const IRECT& bounds, IActionFunction aF =
EmptyClickActionFunc,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
bool valueInButton =
false, EDirection direction = EDirection::Horizontal,
int numStates = 2,
int initialState = 0);
118 void OnEndAnimation()
override;
119 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
123 IRECT mStartRect, mEndRect;
125 EDirection mDirection;
133 enum class ETabSegment { Start, Mid, End };
143 IVTabSwitchControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const std::vector<const char*>& options = {},
const char* label =
"",
const IVStyle & style = DEFAULT_STYLE, EVShape shape = EVShape::Rectangle, EDirection direction = EDirection::Horizontal);
153 IVTabSwitchControl(
const IRECT& bounds, IActionFunction aF,
const std::vector<const char*>& options,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE, EVShape shape = EVShape::Rectangle, EDirection direction = EDirection::Horizontal);
160 virtual void DrawButton(
IGraphics& g,
const IRECT& bounds,
bool pressed,
bool mouseOver, ETabSegment segment,
bool disabled);
161 virtual void DrawButtonText(
IGraphics& g,
const IRECT& bounds,
bool pressed,
bool mouseOver, ETabSegment segment,
bool disabled,
const char* textStr);
167 virtual bool IsHit(
float x,
float y)
const override;
176 int mMouseOverButton = -1;
177 WDL_TypedBuf<IRECT> mButtons;
178 WDL_PtrList<WDL_String> mTabLabels;
179 EDirection mDirection;
194 IVRadioButtonControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const std::initializer_list<const char*>& options = {},
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE, EVShape shape = EVShape::Ellipse, EDirection direction = EDirection::Vertical,
float buttonSize = 10.f);
205 IVRadioButtonControl(
const IRECT& bounds, IActionFunction aF,
const std::initializer_list<const char*>& options,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE, EVShape shape = EVShape::Ellipse, EDirection direction = EDirection::Vertical,
float buttonSize = 10.f);
213 float mButtonAreaWidth;
214 bool mOnlyButtonsRespondToMouse =
false;
228 IVMenuButtonControl(
const IRECT& bounds,
int paramIdx,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE, EVShape shape = EVShape::Rectangle);
246 const char* label =
"",
247 const IVStyle& style = DEFAULT_STYLE,
248 bool valueIsEditable =
false,
bool valueInWidget =
false,
249 float a1 = -135.f,
float a2 = 135.f,
float aAnchor = -135.f,
250 EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING,
float trackSize = 2.f);
253 const char* label =
"",
254 const IVStyle& style = DEFAULT_STYLE,
255 bool valueIsEditable =
false,
bool valueInWidget =
false,
256 float a1 = -135.f,
float a2 = 135.f,
float aAnchor = -135.f,
257 EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING,
float trackSize = 2.f);
263 virtual void DrawIndicatorTrack(
IGraphics& g,
float angle,
float cx,
float cy,
float radius);
264 virtual void DrawPointer(
IGraphics& g,
float angle,
float cx,
float cy,
float radius);
273 bool IsHit(
float x,
float y)
const override;
274 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
277 void SetInnerPointerFrac(
float frac) { mInnerPointerFrac = frac; }
278 void SetOuterPointerFrac(
float frac) { mOuterPointerFrac = frac; }
279 void SetPointerThickness(
float thickness) { mPointerThickness = thickness; }
281 float GetRadius()
const;
282 IRECT GetTrackBounds()
const;
287 float mTrackToHandleDistance = 4.f;
288 float mInnerPointerFrac = 0.1f;
289 float mOuterPointerFrac = 1.f;
290 float mPointerThickness = 2.5f;
291 float mAngle1, mAngle2;
293 bool mValueMouseOver =
false;
301 IVSliderControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
bool valueIsEditable =
false, EDirection dir = EDirection::Vertical,
double gearing = DEFAULT_GEARING,
float handleSize = 8.f,
float trackSize = 2.f,
bool handleInsideTrack =
false,
float handleXOffset = 0.f,
float handleYOffset = 0.f);
303 IVSliderControl(
const IRECT& bounds, IActionFunction aF,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
bool valueIsEditable =
false, EDirection dir = EDirection::Vertical,
double gearing = DEFAULT_GEARING,
float handleSize = 8.f,
float trackSize = 2.f,
bool handleInsideTrack =
false,
float handleXOffset = 0.f,
float handleYOffset = 0.f);
316 bool IsHit(
float x,
float y)
const override;
318 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
321 IRECT GetTrackBounds()
const
323 auto offset = -mHandleSize + (mStyle.frameThickness / 2.0f);
324 return mWidgetBounds.
GetPadded(mDirection == EDirection::Horizontal ? offset : 0,
325 mDirection == EDirection::Vertical ? offset : 0,
326 mDirection == EDirection::Horizontal ? offset : 0,
327 mDirection == EDirection::Vertical ? offset : 0);
331 bool mHandleInsideTrack =
false;
332 bool mValueMouseOver =
false;
333 float mHandleXOffset = 0.f;
334 float mHandleYOffset = 0.f;
341 IVRangeSliderControl(
const IRECT& bounds,
const std::initializer_list<int>& params,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE, EDirection dir = EDirection::Vertical,
bool onlyHandle =
false,
float handleSize = 8.f,
float trackSize = 2.f);
353 void MakeTrackRects(
const IRECT& bounds)
override;
354 IRECT GetHandleBounds(
int trackIdx);
356 int mMouseOverHandle = -1;
358 bool mMouseIsDown =
false;
365 IVXYPadControl(
const IRECT& bounds,
const std::initializer_list<int>& params,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
float handleRadius = 10.f,
bool trackClipsHandle =
true,
bool drawCross =
true);
369 virtual void DrawHandle(
IGraphics& g,
const IRECT& trackBounds,
const IRECT& handleBounds);
377 bool mMouseDown =
false;
378 bool mTrackClipsHandle =
true;
379 bool mDrawCross =
true;
408 IVPlotControl(
const IRECT& bounds,
const std::initializer_list<Plot>& funcs,
int numPoints,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
float min = -1.,
float max = 1.,
bool useLayer =
false);
420 std::vector<Plot> mPlots;
423 bool mUseLayer =
true;
424 int mHorizontalDivisions = 10;
425 int mVerticalDivisions = 10;
427 std::vector<float> mPoints;
442 IVGroupControl(
const IRECT& bounds,
const char* label =
"",
float labelOffset = 10.f,
const IVStyle& style = DEFAULT_STYLE, IContainerBase::AttachFunc attachFunc =
nullptr, IContainerBase::ResizeFunc resizeFunc =
nullptr);
453 IVGroupControl(
const char* label,
const char* groupName,
float padL = 0.f,
float padT = 0.f,
float padR = 0.f,
float padB = 0.f,
const IVStyle& style = DEFAULT_STYLE);
468 WDL_String mGroupName;
473 float mLabelOffset = 10.f;
474 float mLabelPadding = 10.f;
482 IVPanelControl(
const IRECT& bounds,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE.WithColor(kFG, COLOR_TRANSLUCENT).WithEmboss(
true))
506 mAttachFunc(
this, mWidgetBounds);
513 if (mResizeFunc && mChildren.GetSize())
514 mResizeFunc(
this, mWidgetBounds);
523 enum class ECellLayout { kGrid, kHorizontal, kVertical };
525 using ColorChosenFunc = std::function<void(
int,
IColor)>;
527 IVColorSwatchControl(
const IRECT& bounds,
const char* label =
"", ColorChosenFunc func =
nullptr,
const IVStyle& spec = DEFAULT_STYLE, ECellLayout layout = ECellLayout::kGrid,
528 const std::initializer_list<EVColor>& colorIDs = { kBG, kFG, kPR, kFR, kHL, kSH, kX1, kX2, kX3 },
529 const std::initializer_list<const char*>& labelsForIDs = { kVColorStrs[kBG],kVColorStrs[kFG],kVColorStrs[kPR],kVColorStrs[kFR],kVColorStrs[kHL],kVColorStrs[kSH],kVColorStrs[kX1],kVColorStrs[kX2],kVColorStrs[kX3] });
542 ColorChosenFunc mColorChosenFunc =
nullptr;
544 ECellLayout mLayout = ECellLayout::kVertical;
545 WDL_TypedBuf<IRECT> mCellRects;
546 WDL_PtrList<WDL_String> mLabels;
547 std::vector<EVColor> mColorIdForCells;
550#pragma mark - SVG Vector Controls
559 void SetSVG(
ISVG& svg);
563 float mStartAngle = -135.f;
564 float mEndAngle = 135.f;
584 ISVGButtonControl(
const IRECT& bounds, IActionFunction aF,
const ISVG& image,
const std::array<IColor, 4> colors = {COLOR_BLACK, COLOR_WHITE, COLOR_DARK_GRAY, COLOR_LIGHT_GRAY}, EColorReplacement colorReplacement = EColorReplacement::Fill);
591 std::array<IColor, 4> mColors;
592 EColorReplacement mColorReplacement = EColorReplacement::None;
619 ISVGToggleControl(
const IRECT& bounds, IActionFunction aF,
const ISVG& image,
const std::array<IColor, 4> colors = {COLOR_BLACK, COLOR_WHITE, COLOR_DARK_GRAY, COLOR_LIGHT_GRAY}, EColorReplacement colorReplacement = EColorReplacement::Fill);
627 ISVGToggleControl(
const IRECT& bounds,
int paramIdx,
const ISVG& image,
const std::array<IColor, 4> colors = {COLOR_BLACK, COLOR_WHITE, COLOR_DARK_GRAY, COLOR_LIGHT_GRAY}, EColorReplacement colorReplacement = EColorReplacement::Fill);
634 std::array<IColor, 4> mColors;
635 EColorReplacement mColorReplacement = EColorReplacement::None;
647 ISVGSwitchControl(
const IRECT& bounds,
const std::initializer_list<ISVG>& svgs,
int paramIdx = kNoParameter, IActionFunction aF =
nullptr);
652 std::vector<ISVG> mSVGs;
666 ISVGSliderControl(
const IRECT& bounds,
const ISVG& handleSvg,
const ISVG& trackSVG,
int paramIdx = kNoParameter, EDirection dir = EDirection::Vertical,
double gearing = DEFAULT_GEARING);
672 IRECT GetHandleBounds(
double value = -1.0)
const;
674 IRECT mTrackSVGBounds;
675 IRECT mHandleBoundsAtMax;
680#pragma mark - Bitmap Controls
724 IBKnobControl(
float x,
float y,
const IBitmap& bitmap,
int paramIdx, EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING)
728 IBKnobControl(
const IRECT& bounds,
const IBitmap& bitmap,
int paramIdx, EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING)
756 IBSliderControl(
float x,
float y,
float trackLength,
const IBitmap& handleBitmap,
const IBitmap& trackBitmap =
IBitmap(),
int paramIdx = kNoParameter, EDirection dir = EDirection::Vertical,
double gearing = DEFAULT_GEARING);
758 IBSliderControl(
const IRECT& bounds,
const IBitmap& handleBitmap,
const IBitmap& trackBitmap =
IBitmap(),
int paramIdx = kNoParameter, EDirection dir = EDirection::Vertical,
double gearing = DEFAULT_GEARING);
766 IRECT GetHandleBounds(
double value = -1.0)
const;
777 IBTextControl(
const IRECT& bounds,
const IBitmap& bitmap,
const IText& text = DEFAULT_TEXT,
const char* str =
"",
int charWidth = 6,
int charHeight = 12,
int charOffset = 0,
bool multiLine =
false,
bool vCenter =
true, EBlend blend = EBlend::Default);
784 int mCharWidth, mCharHeight, mCharOffset;
793 enum class EResponse {
802 IBMeterControl(
float x,
float y,
const IBitmap& bitmap, EResponse response = EResponse::Log,
float lowRangeDB = -72.f,
float highRangeDB = 12.f)
804 , mResponse(response)
805 , mLowRangeDB(lowRangeDB)
806 , mHighRangeDB(highRangeDB)
812 IBMeterControl(
const IRECT& bounds,
const IBitmap& bitmap, EResponse response = EResponse::Log,
float lowRangeDB = -72.f,
float highRangeDB = 12.f)
814 , mResponse(response)
815 , mLowRangeDB(lowRangeDB)
816 , mHighRangeDB(highRangeDB)
827 EResponse mResponse = EResponse::Linear;
830END_IGRAPHICS_NAMESPACE
This file contains the base IControl implementation, along with some base classes for specific types ...
Includes meta controls for basic preset managers.
A bitmap knob/dial control that draws a frame from a stacked bitmap.
void OnRescale() override
Implement to do something when graphics is scaled globally (e.g.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A bitmap knob/dial control that rotates an image.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A bitmap meter control, that can be used for VUMeters.
void OnMsgFromDelegate(int msgTag, int dataSize, const void *pData) override
Implement to receive messages sent to the control, see IEditorDelegate:SendControlMsgFromDelegate()
IBMeterControl(float x, float y, const IBitmap &bitmap, EResponse response=EResponse::Log, float lowRangeDB=-72.f, float highRangeDB=12.f)
Constructs a bitmap meter control.
IBMeterControl(const IRECT &bounds, const IBitmap &bitmap, EResponse response=EResponse::Log, float lowRangeDB=-72.f, float highRangeDB=12.f)
Constructs a bitmap meter control.
void OnRescale() override
Implement to do something when graphics is scaled globally (e.g.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A bitmap slider/fader control.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnRescale() override
Implement to do something when graphics is scaled globally (e.g.
void OnRescale() override
Implement to do something when graphics is scaled globally (e.g.
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A control to display text using a monospace bitmap font.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnRescale() override
Implement to do something when graphics is scaled globally (e.g.
A base interface to be combined with IControl for bitmap-based controls "IBControls",...
void AttachIControl(IControl *pControl)
Call in the constructor of your IBControl to link the IBitmapBase and IControl.
void DrawBitmap(IGraphics &g)
Draw a frame of a multi-frame bitmap based on the IControl value.
A basic control to draw a bitmap, or one frame of a stacked bitmap depending on the current value.
User-facing bitmap abstraction that you use to manage bitmap data, independant of draw class/platform...
IContainerBase allows a control to nest sub controls and it clips the drawing of those subcontrols In...
The lowest level base class of an IGraphics control.
virtual void OnMouseOut()
Implement this method to respond to a mouseout event on this control.
bool mMouseIsOver
if mGraphics::mHandleMouseOver = true, this will be true when the mouse is over control.
void SetTargetRECT(const IRECT &bounds)
Set the rectangular mouse tracking target area, within the graphics context for this control.
virtual void SetDirty(bool triggerAction=true, int valIdx=kNoValIdx)
Mark the control as dirty, i.e.
The lowest level base class of an IGraphics context.
IBitmap GetScaledBitmap(IBitmap &inBitmap)
Get a version of the input bitmap from the cache that corresponds to the current screen scale For exa...
A base class for knob/dial controls, to handle mouse action and Sender.
A vector knob/dial control which rotates an SVG image.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A Slider control with and SVG for track and handle.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
A vector switch control which shows one of multiple SVG states.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A vector toggle switch control which shows an SVG image.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A base class for slider/fader controls, to handle mouse action and Sender.
A base class for switch controls.
A basic control to display some text.
A control to show a color swatch of up to 9 colors.
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
void OnMouseOver(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouseover event on this control.
A control to draw a rectangle around a named IControl group.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
void OnInit() override
Called just prior to when the control is attached, after its delegate and graphics member variable se...
void SetBoundsBasedOnGroup(const char *groupName, float padL, float padT, float padR, float padB)
Set the bounds of the group control based on the area occupied by the controls in a particular group.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
A vector knob control drawn using graphics primitives.
void OnInit() override
Called just prior to when the control is attached, after its delegate and graphics member variable se...
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnMouseOver(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouseover event on this control.
bool IsHit(float x, float y) const override
Hit test the control.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
virtual void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
void OnMouseDblClick(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse double click event on this control.
void OnMouseUp(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse up event on this control.
virtual IRECT GetKnobDragBounds() override
Get the area for which mouse deltas will be used to calculate the amount dragging changes the control...
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
void SetDirty(bool push, int valIdx=kNoValIdx) override
Mark the control as dirty, i.e.
A vector label control that can display text with a shadow.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
A panel control which can be styled with emboss etc.
void OnAttached() override
Called after the control has been attached, and its delegate and graphics member variable set.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
A vector plot to display functions and waveforms.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void AddPlotFunc(const IColor &color, const IPlotFunc &func)
add a new function to the plot
std::function< double(double)> IPlotFunc
IVPlotControl passes values between 0 and 1 to this object, that are the plot normalized x values.
Groups a plot function and color.
A vector range slider control, with two handles.
void OnMouseOver(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouseover event on this control.
void OnMouseDrag(float x, float y, float dX, float dY, const IMouseMod &mod) override
Implement this method to respond to a mouse drag event on this control.
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
void OnMouseUp(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse up event on this control.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
A switch with a slide animation when clicked.
virtual void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
void SetDirty(bool push, int valIdx=kNoValIdx) override
Mark the control as dirty, i.e.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
void OnMouseOver(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouseover event on this control.
void SetDirty(bool push, int valIdx=kNoValIdx) override
Mark the control as dirty, i.e.
void OnMouseUp(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse up event on this control.
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
void OnMouseDblClick(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse double click event on this control.
virtual void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
bool IsHit(float x, float y) const override
Hit test the control.
void OnInit() override
Called just prior to when the control is attached, after its delegate and graphics member variable se...
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnInit() override
Called just prior to when the control is attached, after its delegate and graphics member variable se...
bool IsHit(float x, float y) const override
Hit test the control.
virtual void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
void SetDirty(bool push, int valIdx=kNoValIdx) override
Mark the control as dirty, i.e.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
A vector "tab" multi switch control.
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
virtual bool IsHit(float x, float y) const override
Hit test the control.
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
virtual void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnMouseOver(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouseover event on this control.
virtual int GetButtonForPoint(float x, float y) const
void OnInit() override
Called just prior to when the control is attached, after its delegate and graphics member variable se...
const char * GetSelectedLabelStr() const
returns the label string on the selected tab
void DrawValue(IGraphics &g, bool mouseOver) override
Draw the IVControl value text.
void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
A base class for mult-strip/track controls, such as multi-sliders, meters Track refers to the channel...
void OnMouseOut() override
Implement this method to respond to a mouseout event on this control.
A vector XY Pad slider control.
void OnMouseDown(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse down event on this control.
void DrawWidget(IGraphics &g) override
Draw the IVControl main widget (override)
void OnMouseDrag(float x, float y, float dX, float dY, const IMouseMod &mod) override
Implement this method to respond to a mouse drag event on this control.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
void Draw(IGraphics &g) override
Draw the control to the graphics context.
void OnMouseUp(float x, float y, const IMouseMod &mod) override
Implement this method to respond to a mouse up event on this control.
A base interface to be combined with IControl for vectorial controls "IVControls",...
IRECT MakeRects(const IRECT &parent, bool hasHandle=false)
Calculate the rectangles for the various areas, depending on the style.
virtual void DrawBackground(IGraphics &g, const IRECT &rect)
Draw the IVControl background (usually transparent)
virtual void DrawValue(IGraphics &g, bool mouseOver)
Draw the IVControl value text.
void AttachIControl(IControl *pControl, const char *label)
Call in the constructor of your IVControl to link the IVectorBase and IControl.
IRECT DrawPressableRectangle(IGraphics &g, const IRECT &bounds, bool pressed, bool mouseOver, bool disabled, bool rtl=true, bool rtr=true, bool rbl=true, bool rbr=true)
Draw a rectangle-shaped vector button.
virtual void DrawLabel(IGraphics &g)
Draw the IVControl label text.
void EmptyClickActionFunc(IControl *pCaller)
A click action function that does nothing.
void DefaultClickActionFunc(IControl *pCaller)
A click action function that triggers the default animation function for DEFAULT_ANIMATION_DURATION.
void SplashClickActionFunc(IControl *pCaller)
The splash click action function is used by IVControls to start SplashAnimationFunc.
std::unique_ptr< ILayer > ILayerPtr
ILayerPtr is a managed pointer for transferring the ownership of layers.
Used to manage color data, independent of draw class/platform.
Used to manage mouse modifiers i.e.
Used to manage a rectangular area, independent of draw class/platform.
IRECT GetCentredInside(const IRECT &sr) const
Get a rectangle the size of sr but with the same center point as this rectangle.
IRECT GetPadded(float padding) const
Get a copy of this IRECT with each value padded by padding N.B.
User-facing SVG abstraction that you use to manage SVG data ISVG doesn't actually own the image data.
IText is used to manage font and text/text entry style for a piece of text on the UI,...
A struct encapsulating a set of properties used to configure IVControls.