14 #if defined IGRAPHICS_NANOVG && defined IGRAPHICS_METAL 21 #include "IGraphicsNanoVG.h" 23 using namespace iplug;
24 using namespace igraphics;
36 SetTooltip(
"TestMPSControl");
42 nvgDeleteFramebuffer(mFBO);
47 void OnMouseDown(
float x,
float y,
const IMouseMod& mod)
override 50 GetUI()->CreatePopupMenu(*
this, mMenu, x, y);
55 void OnPopupMenuSelection(
IPopupMenu* pSelectedMenu,
int valIdx)
override 58 mKernelType = pSelectedMenu->GetChosenItemIdx();
63 NVGframebuffer* mFBO =
nullptr;
64 IPopupMenu mMenu {
"MPS Type", 0,
false, {
"MPSImageGaussianBlur",
"MPSImageSobel",
"MPSImageThresholdToZero"}};
75 SetTooltip(
"TestMPSControl");
80 g.
DrawText(mText,
"UNSUPPORTED", mRECT);
The lowest level base class of an IGraphics control.
Used to manage a rectangular area, independent of draw class/platform.
User-facing bitmap abstraction that you use to manage bitmap data, independant of draw class/platform...
Used to manage mouse modifiers i.e.
A base interface to be combined with IControl for bitmap-based controls "IBControls", managing an IBitmap.
void DrawText(const IText &text, const char *str, const IRECT &bounds, const IBlend *pBlend=0)
Draw some text to the graphics context in a specific rectangle.
This file contains the base IControl implementation, along with some base classes for specific types ...
Control to test IGraphicsNanoVG with Metal Performance Shaders.
The lowest level base class of an IGraphics context.
A base class for knob/dial controls, to handle mouse action and Sender.
void Draw(IGraphics &g) override
Draw the control to the graphics context.