33BEGIN_IGRAPHICS_NAMESPACE
40#pragma mark - Vector Controls
47 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)));
68 bool IsHit(
float x,
float y)
const override;
77 IVSwitchControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
bool valueInButton =
true);
84 bool IsHit(
float x,
float y)
const override;
85 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
94 IVToggleControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
const char* offText =
"OFF",
const char* onText =
"ON");
116 IVSlideSwitchControl(
const IRECT& bounds,
int paramIdx = kNoParameter,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE,
bool valueInButton =
false, EDirection direction = EDirection::Horizontal);
127 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);
135 void OnEndAnimation()
override;
136 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
140 IRECT mStartRect, mEndRect;
142 EDirection mDirection;
150 enum class ETabSegment { Start, Mid, End };
160 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);
170 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);
177 virtual void DrawButton(
IGraphics& g,
const IRECT& bounds,
bool pressed,
bool mouseOver, ETabSegment segment,
bool disabled);
178 virtual void DrawButtonText(
IGraphics& g,
const IRECT& bounds,
bool pressed,
bool mouseOver, ETabSegment segment,
bool disabled,
const char* textStr);
184 virtual bool IsHit(
float x,
float y)
const override;
193 int mMouseOverButton = -1;
194 WDL_TypedBuf<IRECT> mButtons;
195 WDL_PtrList<WDL_String> mTabLabels;
196 EDirection mDirection;
211 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);
222 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);
230 float mButtonAreaWidth;
231 bool mOnlyButtonsRespondToMouse =
false;
245 IVMenuButtonControl(
const IRECT& bounds,
int paramIdx,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE, EVShape shape = EVShape::Rectangle);
263 const char* label =
"",
264 const IVStyle& style = DEFAULT_STYLE,
265 bool valueIsEditable =
false,
bool valueInWidget =
false,
266 float a1 = -135.f,
float a2 = 135.f,
float aAnchor = -135.f,
267 EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING,
float trackSize = 2.f);
270 const char* label =
"",
271 const IVStyle& style = DEFAULT_STYLE,
272 bool valueIsEditable =
false,
bool valueInWidget =
false,
273 float a1 = -135.f,
float a2 = 135.f,
float aAnchor = -135.f,
274 EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING,
float trackSize = 2.f);
281 virtual void DrawIndicatorTrack(
IGraphics& g,
float angle,
float cx,
float cy,
float radius);
282 virtual void DrawPointer(
IGraphics& g,
float angle,
float cx,
float cy,
float radius);
291 bool IsHit(
float x,
float y)
const override;
292 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
295 void SetInnerPointerFrac(
float frac) { mInnerPointerFrac = frac; }
296 void SetOuterPointerFrac(
float frac) { mOuterPointerFrac = frac; }
297 void SetPointerThickness(
float thickness) { mPointerThickness = thickness; }
299 float GetRadius()
const;
300 IRECT GetTrackBounds()
const;
305 float mTrackToHandleDistance = 4.f;
306 float mInnerPointerFrac = 0.1f;
307 float mOuterPointerFrac = 1.f;
308 float mPointerThickness = 2.5f;
309 float mAngle1, mAngle2;
311 bool mValueMouseOver =
false;
319 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);
321 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);
334 bool IsHit(
float x,
float y)
const override;
336 void SetDirty(
bool push,
int valIdx = kNoValIdx)
override;
339 IRECT GetTrackBounds()
const
341 auto offset = -mHandleSize + (mStyle.frameThickness / 2.0f);
342 return mWidgetBounds.
GetPadded(mDirection == EDirection::Horizontal ? offset : 0,
343 mDirection == EDirection::Vertical ? offset : 0,
344 mDirection == EDirection::Horizontal ? offset : 0,
345 mDirection == EDirection::Vertical ? offset : 0);
349 bool mHandleInsideTrack =
false;
350 bool mValueMouseOver =
false;
351 float mHandleXOffset = 0.f;
352 float mHandleYOffset = 0.f;
359 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);
371 void MakeTrackRects(
const IRECT& bounds)
override;
372 IRECT GetHandleBounds(
int trackIdx);
374 int mMouseOverHandle = -1;
376 bool mMouseIsDown =
false;
383 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);
387 virtual void DrawHandle(
IGraphics& g,
const IRECT& trackBounds,
const IRECT& handleBounds);
395 bool mMouseDown =
false;
396 bool mTrackClipsHandle =
true;
397 bool mDrawCross =
true;
426 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);
438 std::vector<Plot> mPlots;
441 bool mUseLayer =
true;
442 int mHorizontalDivisions = 10;
443 int mVerticalDivisions = 10;
445 std::vector<float> mPoints;
460 IVGroupControl(
const IRECT& bounds,
const char* label =
"",
float labelOffset = 10.f,
const IVStyle& style = DEFAULT_STYLE, IContainerBase::AttachFunc attachFunc =
nullptr, IContainerBase::ResizeFunc resizeFunc =
nullptr);
471 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);
486 WDL_String mGroupName;
491 float mLabelOffset = 10.f;
492 float mLabelPadding = 10.f;
500 IVPanelControl(
const IRECT& bounds,
const char* label =
"",
const IVStyle& style = DEFAULT_STYLE.WithColor(kFG, COLOR_TRANSLUCENT).WithEmboss(
true))
524 mAttachFunc(
this, mWidgetBounds);
531 if (mResizeFunc && mChildren.GetSize())
532 mResizeFunc(
this, mWidgetBounds);
541 enum class ECellLayout { kGrid, kHorizontal, kVertical };
543 using ColorChosenFunc = std::function<void(
int,
IColor)>;
545 IVColorSwatchControl(
const IRECT& bounds,
const char* label =
"", ColorChosenFunc func =
nullptr,
const IVStyle& spec = DEFAULT_STYLE, ECellLayout layout = ECellLayout::kGrid,
546 const std::initializer_list<EVColor>& colorIDs = { kBG, kFG, kPR, kFR, kHL, kSH, kX1, kX2, kX3 },
547 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] });
560 ColorChosenFunc mColorChosenFunc =
nullptr;
562 ECellLayout mLayout = ECellLayout::kVertical;
563 WDL_TypedBuf<IRECT> mCellRects;
564 WDL_PtrList<WDL_String> mLabels;
565 std::vector<EVColor> mColorIdForCells;
568#pragma mark - SVG Vector Controls
577 void SetSVG(
ISVG& svg);
581 float mStartAngle = -135.f;
582 float mEndAngle = 135.f;
602 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);
609 std::array<IColor, 4> mColors;
610 EColorReplacement mColorReplacement = EColorReplacement::None;
637 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);
645 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);
652 std::array<IColor, 4> mColors;
653 EColorReplacement mColorReplacement = EColorReplacement::None;
665 ISVGSwitchControl(
const IRECT& bounds,
const std::initializer_list<ISVG>& svgs,
int paramIdx = kNoParameter, IActionFunction aF =
nullptr);
670 std::vector<ISVG> mSVGs;
684 ISVGSliderControl(
const IRECT& bounds,
const ISVG& handleSvg,
const ISVG& trackSVG,
int paramIdx = kNoParameter, EDirection dir = EDirection::Vertical,
double gearing = DEFAULT_GEARING);
690 IRECT GetHandleBounds(
double value = -1.0)
const;
692 IRECT mTrackSVGBounds;
693 IRECT mHandleBoundsAtMax;
698#pragma mark - Bitmap Controls
742 IBKnobControl(
float x,
float y,
const IBitmap& bitmap,
int paramIdx, EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING)
746 IBKnobControl(
const IRECT& bounds,
const IBitmap& bitmap,
int paramIdx, EDirection direction = EDirection::Vertical,
double gearing = DEFAULT_GEARING)
774 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);
776 IBSliderControl(
const IRECT& bounds,
const IBitmap& handleBitmap,
const IBitmap& trackBitmap =
IBitmap(),
int paramIdx = kNoParameter, EDirection dir = EDirection::Vertical,
double gearing = DEFAULT_GEARING);
784 IRECT GetHandleBounds(
double value = -1.0)
const;
795 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);
802 int mCharWidth, mCharHeight, mCharOffset;
811 enum class EResponse {
820 IBMeterControl(
float x,
float y,
const IBitmap& bitmap, EResponse response = EResponse::Log,
float lowRangeDB = -72.f,
float highRangeDB = 12.f)
822 , mResponse(response)
823 , mLowRangeDB(lowRangeDB)
824 , mHighRangeDB(highRangeDB)
830 IBMeterControl(
const IRECT& bounds,
const IBitmap& bitmap, EResponse response = EResponse::Log,
float lowRangeDB = -72.f,
float highRangeDB = 12.f)
832 , mResponse(response)
833 , mLowRangeDB(lowRangeDB)
834 , mHighRangeDB(highRangeDB)
845 EResponse mResponse = EResponse::Linear;
848END_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.