iPlug2 - C++ Audio Plug-in Framework
Classes | Typedefs | Functions | Variables
IGraphics::Structs

Utility structures and classes for IGraphics. More...

Classes

class  IPopupMenu
 A class for setting the contents of a pop up menu. More...
 
class  IBitmap
 User-facing bitmap abstraction that you use to manage bitmap data, independant of draw class/platform. More...
 
struct  ISVG
 User-facing SVG abstraction that you use to manage SVG data ISVG doesn't actually own the image data. More...
 
struct  IColor
 Used to manage color data, independent of draw class/platform. More...
 
struct  IBlend
 Used to manage composite/blend operations, independent of draw class/platform. More...
 
struct  IFillOptions
 Used to manage fill behaviour for path based drawing back ends. More...
 
struct  IStrokeOptions
 Used to manage stroke behaviour for path based drawing back ends. More...
 
struct  IText
 IText is used to manage font and text/text entry style for a piece of text on the UI, independent of draw class/platform. More...
 
struct  IRECT
 Used to manage a rectangular area, independent of draw class/platform. More...
 
struct  IMouseMod
 Used to manage mouse modifiers i.e. More...
 
struct  IMouseInfo
 Used to group mouse coordinates with mouse modifier information. More...
 
struct  IGestureInfo
 Used to describe a particular gesture. More...
 
class  IRECTList
 Used to manage a list of rectangular areas and optimize them for drawing to the screen. More...
 
struct  IMatrix
 Used to store transformation matrices. More...
 
struct  IColorStop
 Used to represent a point/stop in a gradient. More...
 
struct  IPattern
 Used to store pattern information for gradients. More...
 
class  ILayer
 An abstraction that is used to store a temporary raster image/framebuffer. More...
 
struct  IShadow
 Used to specify properties of a drop-shadow to a layer. More...
 
struct  IVColorSpec
 Contains a set of 9 colors used to theme IVControls. More...
 
struct  IVStyle
 A struct encapsulating a set of properties used to configure IVControls. More...
 

Typedefs

using IActionFunction = std::function< void(IControl *)>
 
using IAnimationFunction = std::function< void(IControl *)>
 
using ILambdaDrawFunction = std::function< void(ILambdaControl *, IGraphics &, IRECT &)>
 
using IKeyHandlerFunc = std::function< bool(const IKeyPress &key, bool isUp)>
 
using IMsgBoxCompletionHanderFunc = std::function< void(EMsgBoxResult result)>
 
using IColorPickerHandlerFunc = std::function< void(const IColor &result)>
 
using IGestureFunc = std::function< void(IControl *, const IGestureInfo &)>
 
using IPopupFunction = std::function< void(IPopupMenu *pMenu)>
 
using IDisplayTickFunc = std::function< void()>
 
using ITouchID = uintptr_t
 
using MTLTexturePtr = void *
 
using Milliseconds = std::chrono::duration< double, std::chrono::milliseconds::period >
 
using TimePoint = std::chrono::time_point< std::chrono::high_resolution_clock, Milliseconds >
 
using ILayerPtr = std::unique_ptr< ILayer >
 ILayerPtr is a managed pointer for transferring the ownership of layers.
 

Functions

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 DefaultAnimationFunc (IControl *pCaller)
 An animation function that just calls the caller control's OnEndAnimation() method at the end of the animation.
 
void SplashClickActionFunc (IControl *pCaller)
 The splash click action function is used by IVControls to start SplashAnimationFunc.
 
void SplashAnimationFunc (IControl *pCaller)
 The splash animation function is used by IVControls to animate the splash.
 
void ShowBubbleHorizontalActionFunc (IControl *pCaller)
 Use with a param-linked control to popup the bubble control horizontally.
 
void ShowBubbleVerticalActionFunc (IControl *pCaller)
 Use with a param-linked control to popup the bubble control vertically.
 
const IColor COLOR_TRANSPARENT (0, 0, 0, 0)
 
const IColor COLOR_TRANSLUCENT (10, 0, 0, 0)
 
const IColor COLOR_BLACK (255, 0, 0, 0)
 
const IColor COLOR_BLACK_DROP_SHADOW (128, 0, 0, 0)
 
const IColor COLOR_GRAY (255, 127, 127, 127)
 
const IColor COLOR_LIGHT_GRAY (255, 240, 240, 240)
 
const IColor COLOR_MID_GRAY (255, 200, 200, 200)
 
const IColor COLOR_DARK_GRAY (255, 70, 70, 70)
 
const IColor COLOR_WHITE (255, 255, 255, 255)
 
const IColor COLOR_RED (255, 255, 0, 0)
 
const IColor COLOR_GREEN (255, 0, 255, 0)
 
const IColor COLOR_BLUE (255, 0, 0, 255)
 
const IColor COLOR_YELLOW (255, 255, 255, 0)
 
const IColor COLOR_ORANGE (255, 255, 127, 0)
 
const IColor COLOR_INDIGO (255, 75, 0, 130)
 
const IColor COLOR_VIOLET (255, 148, 0, 211)
 
static IColor GetRainbow (int colorIdx)
 
float BlendWeight (const IBlend *pBlend)
 Helper function to extract the blend weight value from an IBlend ptr if it is valid. More...
 
static const char * TextStyleString (ETextStyle style)
 Helper to get a CString based on ETextStyle.
 

Variables

const IColor DEFAULT_GRAPHICS_BGCOLOR = COLOR_GRAY
 
const IColor DEFAULT_BGCOLOR = COLOR_TRANSPARENT
 
const IColor DEFAULT_FGCOLOR = COLOR_MID_GRAY
 
const IColor DEFAULT_PRCOLOR = COLOR_LIGHT_GRAY
 
const IColor DEFAULT_FRCOLOR = COLOR_DARK_GRAY
 
const IColor DEFAULT_HLCOLOR = COLOR_TRANSLUCENT
 
const IColor DEFAULT_SHCOLOR = IColor(60, 0, 0, 0)
 
const IColor DEFAULT_X1COLOR = COLOR_BLACK
 
const IColor DEFAULT_X2COLOR = COLOR_GREEN
 
const IColor DEFAULT_X3COLOR = COLOR_BLUE
 
const IColor DEFAULT_TEXT_FGCOLOR = COLOR_BLACK
 
const IColor DEFAULT_TEXTENTRY_BGCOLOR = COLOR_WHITE
 
const IColor DEFAULT_TEXTENTRY_FGCOLOR = COLOR_BLACK
 
const IBlend BLEND_75 = IBlend(EBlend::Default, 0.75f)
 
const IBlend BLEND_50 = IBlend(EBlend::Default, 0.5f)
 
const IBlend BLEND_25 = IBlend(EBlend::Default, 0.25f)
 
const IBlend BLEND_10 = IBlend(EBlend::Default, 0.1f)
 
const IBlend BLEND_05 = IBlend(EBlend::Default, 0.05f)
 
const IBlend BLEND_01 = IBlend(EBlend::Default, 0.01f)
 
const IBlend BLEND_DST_IN = IBlend(EBlend::DstIn, 1.f)
 
const IBlend BLEND_DST_OVER = IBlend(EBlend::DstOver, 1.f)
 
const IText DEFAULT_TEXT = IText()
 
const IVColorSpec DEFAULT_COLOR_SPEC = IVColorSpec()
 
static constexpr bool DEFAULT_HIDE_CURSOR = true
 
static constexpr bool DEFAULT_SHOW_VALUE = true
 
static constexpr bool DEFAULT_SHOW_LABEL = true
 
static constexpr bool DEFAULT_DRAW_FRAME = true
 
static constexpr bool DEFAULT_DRAW_SHADOWS = true
 
static constexpr bool DEFAULT_EMBOSS = false
 
static constexpr float DEFAULT_ROUNDNESS = 0.f
 
static constexpr float DEFAULT_FRAME_THICKNESS = 1.f
 
static constexpr float DEFAULT_SHADOW_OFFSET = 3.f
 
static constexpr float DEFAULT_WIDGET_FRAC = 1.f
 
static constexpr float DEFAULT_WIDGET_ANGLE = 0.f
 
const IText DEFAULT_LABEL_TEXT {DEFAULT_TEXT_SIZE + 5.f, EVAlign::Top}
 
const IText DEFAULT_VALUE_TEXT {DEFAULT_TEXT_SIZE, EVAlign::Bottom}
 
const IVStyle DEFAULT_STYLE = IVStyle()
 

Detailed Description

Utility structures and classes for IGraphics.


Class Documentation

struct IStrokeOptions

Used to manage stroke behaviour for path based drawing back ends.

Definition at line 591 of file IGraphicsStructs.h.

Class Members
ELineCap mCapOption
DashOptions mDash
ELineJoin mJoinOption
float mMiterLimit
bool mPreserve
struct IMouseInfo

Used to group mouse coordinates with mouse modifier information.

Definition at line 1718 of file IGraphicsStructs.h.

Class Members
float dX
float dY
IMouseMod ms
float x
float y
struct IGestureInfo

Used to describe a particular gesture.

Definition at line 1726 of file IGraphicsStructs.h.

Class Members
float angle
float scale
EGestureState state
EGestureType type
float velocity
float x
float y

Function Documentation

float BlendWeight ( const IBlend pBlend)
inline

Helper function to extract the blend weight value from an IBlend ptr if it is valid.

Parameters
pBlendptr to an IBlend or nullptr
Returns
float The blend weight value

Definition at line 562 of file IGraphicsStructs.h.

Referenced by IGraphicsCanvas::DrawBitmap(), IGraphicsNanoVG::DrawBitmap(), and IGraphicsCanvas::PathFill().