iPlug2 - C++ Audio Plug-in Framework
Public Member Functions | Public Attributes | List of all members
IVStyle Struct Reference

A struct encapsulating a set of properties used to configure IVControls. More...

#include <IGraphicsStructs.h>

Public Member Functions

 IVStyle (bool showLabel=DEFAULT_SHOW_LABEL, bool showValue=DEFAULT_SHOW_VALUE, const IVColorSpec &colors={DEFAULT_BGCOLOR, DEFAULT_FGCOLOR, DEFAULT_PRCOLOR, DEFAULT_FRCOLOR, DEFAULT_HLCOLOR, DEFAULT_SHCOLOR, DEFAULT_X1COLOR, DEFAULT_X2COLOR, DEFAULT_X3COLOR}, const IText &labelText=DEFAULT_LABEL_TEXT, const IText &valueText=DEFAULT_VALUE_TEXT, bool hideCursor=DEFAULT_HIDE_CURSOR, bool drawFrame=DEFAULT_DRAW_FRAME, bool drawShadows=DEFAULT_DRAW_SHADOWS, bool emboss=DEFAULT_EMBOSS, float roundness=DEFAULT_ROUNDNESS, float frameThickness=DEFAULT_FRAME_THICKNESS, float shadowOffset=DEFAULT_SHADOW_OFFSET, float widgetFrac=DEFAULT_WIDGET_FRAC, float angle=DEFAULT_WIDGET_ANGLE)
 Create a new IVStyle to configure common styling for IVControls. More...
 
 IVStyle (const std::initializer_list< IColor > &colors)
 Create a new IVStyle based on a list of colors, and defaults for the other elements. More...
 
IVStyle WithShowLabel (bool show=true) const
 
IVStyle WithShowValue (bool show=true) const
 
IVStyle WithLabelText (const IText &text) const
 
IVStyle WithValueText (const IText &text) const
 
IVStyle WithHideCursor (bool hide=true) const
 
IVStyle WithColor (EVColor idx, IColor color) const
 
IVStyle WithColors (IVColorSpec spec) const
 
IVStyle WithRoundness (float v) const
 
IVStyle WithFrameThickness (float v) const
 
IVStyle WithShadowOffset (float v) const
 
IVStyle WithDrawShadows (bool v=true) const
 
IVStyle WithDrawFrame (bool v=true) const
 
IVStyle WithWidgetFrac (float v) const
 
IVStyle WithAngle (float v) const
 
IVStyle WithEmboss (bool v=true) const
 

Public Attributes

bool hideCursor = DEFAULT_HIDE_CURSOR
 
bool showLabel = DEFAULT_SHOW_LABEL
 
bool showValue = DEFAULT_SHOW_VALUE
 
bool drawFrame = DEFAULT_DRAW_FRAME
 
bool drawShadows = DEFAULT_DRAW_SHADOWS
 
bool emboss = DEFAULT_EMBOSS
 
float roundness = DEFAULT_ROUNDNESS
 
float frameThickness = DEFAULT_FRAME_THICKNESS
 
float shadowOffset = DEFAULT_SHADOW_OFFSET
 
float widgetFrac = DEFAULT_WIDGET_FRAC
 
float angle = DEFAULT_WIDGET_ANGLE
 
IVColorSpec colorSpec = DEFAULT_COLOR_SPEC
 
IText labelText = DEFAULT_LABEL_TEXT
 
IText valueText = DEFAULT_VALUE_TEXT
 

Detailed Description

A struct encapsulating a set of properties used to configure IVControls.

Definition at line 2481 of file IGraphicsStructs.h.

Constructor & Destructor Documentation

IVStyle::IVStyle ( bool  showLabel = DEFAULT_SHOW_LABEL,
bool  showValue = DEFAULT_SHOW_VALUE,
const IVColorSpec colors = {DEFAULT_BGCOLOR, DEFAULT_FGCOLOR, DEFAULT_PRCOLOR, DEFAULT_FRCOLOR, DEFAULT_HLCOLOR, DEFAULT_SHCOLOR, DEFAULT_X1COLOR, DEFAULT_X2COLOR, DEFAULT_X3COLOR},
const IText labelText = DEFAULT_LABEL_TEXT,
const IText valueText = DEFAULT_VALUE_TEXT,
bool  hideCursor = DEFAULT_HIDE_CURSOR,
bool  drawFrame = DEFAULT_DRAW_FRAME,
bool  drawShadows = DEFAULT_DRAW_SHADOWS,
bool  emboss = DEFAULT_EMBOSS,
float  roundness = DEFAULT_ROUNDNESS,
float  frameThickness = DEFAULT_FRAME_THICKNESS,
float  shadowOffset = DEFAULT_SHADOW_OFFSET,
float  widgetFrac = DEFAULT_WIDGET_FRAC,
float  angle = DEFAULT_WIDGET_ANGLE 
)
inline

Create a new IVStyle to configure common styling for IVControls.

Parameters
showLabelShow the label
showValueShow the value
colorsAn IVColorSpec for the style
labelTextThe IText for the label text style
valueTextThe IText for the value text style
hideCursorShould the cursor be hidden e.g. when dragging the control
drawFrameShould the frame be drawn around the bounds of the control or around the handle, where relevant
drawShadowsShould there be a shadow beneath the control handle
embossShould the handle of the control be embossed
roundnessThe roundness factor for the control's elements
frameThicknessThe thickness of the controls frame elements
shadowOffsetThe distance of the shadow from the foreground
widgetFracThe fraction of the widget area (control area - label/value if shown) that the widget occupies
angleThe rotation angle in degrees of e.g. the handle/pointer on an IVSlider

Definition at line 2513 of file IGraphicsStructs.h.

IVStyle::IVStyle ( const std::initializer_list< IColor > &  colors)
inline

Create a new IVStyle based on a list of colors, and defaults for the other elements.

Parameters
colors

Definition at line 2546 of file IGraphicsStructs.h.

References Clip().


The documentation for this struct was generated from the following file: