diff --git a/_i_bubble_control_8h_source.html b/_i_bubble_control_8h_source.html
index 3eb64cb6..6a1e865a 100644
--- a/_i_bubble_control_8h_source.html
+++ b/_i_bubble_control_8h_source.html
@@ -414,7 +414,7 @@
IControl * SetActionFunction(IActionFunction actionFunc)
Set an Action Function for this control.
void SetAnimation(IAnimationFunction func)
Set the animation function.
The lowest level base class of an IGraphics context.
-bool ControlIsCaptured() const
Check to see if any control is captured.
+bool ControlIsCaptured() const
Check to see if any control is captured.
virtual void PathFill(const IPattern &pattern, const IFillOptions &options=IFillOptions(), const IBlend *pBlend=0)=0
Fill the current current path.
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.
virtual void PathClose()=0
Close the path that is being specified.
@@ -424,7 +424,7 @@
virtual void PathMoveTo(float x, float y)=0
Move the current point in the current path.
virtual void PathArc(float cx, float cy, float r, float a1, float a2, EWinding winding=EWinding::CW)=0
Add an arc to the current path.
virtual void PathLineTo(float x, float y)=0
Add a line to the current path from the current point to the specified location.
-IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
+IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
virtual float MeasureText(const IText &text, const char *str, IRECT &bounds) const
Measure the rectangular region that some text will occupy.
Used to manage stroke behaviour for path based drawing back ends.
Used to manage composite/blend operations, independent of draw class/platform.
diff --git a/_i_control_8cpp_source.html b/_i_control_8cpp_source.html
index 91462ccb..e9b1bd7b 100644
--- a/_i_control_8cpp_source.html
+++ b/_i_control_8cpp_source.html
@@ -1335,9 +1335,9 @@
void ReleaseMouseCapture()
Used to tell the graphics context to stop tracking mouse interaction with a control.
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
virtual void DrawLine(const IColor &color, float x1, float y1, float x2, float y2, const IBlend *pBlend=0, float thickness=1.f)
Draw a line to the graphics context.
-void GetMouseDownPoint(float &x, float &y) const
Get the x, y position of the last mouse down message.
+void GetMouseDownPoint(float &x, float &y) const
Get the x, y position of the last mouse down message.
virtual void FillTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0)
Fill a triangle with a color.
-IControl * GetControlInTextEntry()
+IControl * GetControlInTextEntry()
void PromptUserInput(IControl &control, const IRECT &bounds, int valIdx=0)
Prompt for user input either using a text entry or pop up menu.
virtual void HideMouseCursor(bool hide=true, bool lock=true)=0
Call to hide/show the mouse cursor.
virtual void FillCircle(const IColor &color, float cx, float cy, float r, const IBlend *pBlend=0)
Fill a circle with a color.
diff --git a/_i_control_8h_source.html b/_i_control_8h_source.html
index 2c0cd1ed..02c1a625 100644
--- a/_i_control_8h_source.html
+++ b/_i_control_8h_source.html
@@ -2153,7 +2153,7 @@
void DrawVerticalLine(const IColor &color, const IRECT &bounds, float x, const IBlend *pBlend=0, float thickness=1.f)
Draw a vertical line, within a rectangular region of the graphics context.
void DrawHorizontalLine(const IColor &color, const IRECT &bounds, float y, const IBlend *pBlend=0, float thickness=1.f)
Draw a horizontal line, within a rectangular region of the graphics context.
void StartLayer(IControl *pOwner, const IRECT &r, bool cacheable=false)
Create an IGraphics layer.
-int GetControlTag(const IControl *pControl) const
Get the tag given to a control.
+int GetControlTag(const IControl *pControl) const
Get the tag given to a control.
virtual void DrawSVG(const ISVG &svg, const IRECT &bounds, const IBlend *pBlend=0, const IColor *pStrokeColor=nullptr, const IColor *pFillColor=nullptr)
Draw an SVG image to the graphics context.
virtual void DrawTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0, float thickness=1.f)
Draw a triangle to the graphics context.
virtual void FillCircle(const IColor &color, float cx, float cy, float r, const IBlend *pBlend=0)
Fill a circle with a color.
diff --git a/_i_corner_resizer_control_8h_source.html b/_i_corner_resizer_control_8h_source.html
index 49929330..7554bdd8 100644
--- a/_i_corner_resizer_control_8h_source.html
+++ b/_i_corner_resizer_control_8h_source.html
@@ -182,8 +182,8 @@
void Resize(int w, int h, float scale, bool needsPlatformResize=true)
virtual ECursor SetMouseCursor(ECursor cursorType=ECursor::ARROW)
Sets the mouse cursor to one of ECursor (implementations should return the result of the base impleme...
virtual void FillTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0)
Fill a triangle with a color.
-float GetDrawScale() const
Gets the graphics context scaling factor.
-IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
+float GetDrawScale() const
Gets the graphics context scaling factor.
+IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
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.
diff --git a/_i_graphics_8cpp_source.html b/_i_graphics_8cpp_source.html
index 2dddc17f..cc7d8d3c 100644
--- a/_i_graphics_8cpp_source.html
+++ b/_i_graphics_8cpp_source.html
@@ -3125,7 +3125,7 @@
virtual bool EditorResizeFromUI(int viewWidth, int viewHeight, bool needsPlatformResize)
If the editor changes UI dimensions, e.g.
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
virtual void LayoutUI(IGraphics *pGraphics)
Called to layout controls when the GUI is initially opened and again if the UI size changes.
-bool ControlIsCaptured() const
Check to see if any control is captured.
+bool ControlIsCaptured() const
Check to see if any control is captured.
void EnableTooltips(bool enable)
virtual float DoMeasureText(const IText &text, const char *str, IRECT &bounds) const =0
void Resize(int w, int h, float scale, bool needsPlatformResize=true)
@@ -3140,12 +3140,12 @@
void AttachPopupMenuControl(const IText &text=DEFAULT_TEXT, const IRECT &bounds=IRECT())
Attach a control for pop-up menus, to override platform style menus.
virtual void DrawPoint(const IColor &color, float x, float y, const IBlend *pBlend=0)
Fill a rectangle corresponding to a pixel on a 1:1 screen with a color.
void RemoveControl(int idx)
Remove a control at a particular index, (frees memory).
-virtual const char * GetBundleID() const
Get the bundle ID on macOS and iOS, returns emtpy string on other OSs.
+virtual const char * GetBundleID() const
Get the bundle ID on macOS and iOS, returns emtpy string on other OSs.
void PathConvexPolygon(float *x, float *y, int nPoints)
Add a convex polygon to the current path.
virtual void PathFill(const IPattern &pattern, const IFillOptions &options=IFillOptions(), const IBlend *pBlend=0)=0
Fill the current current path.
-virtual float GetPlatformWindowScale() const
Returns a scaling factor for resizing parent windows via the host/plugin API.
+virtual float GetPlatformWindowScale() const
Returns a scaling factor for resizing parent windows via the host/plugin API.
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.
-float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
+float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
int GetParamIdxForPTAutomation(float x, float y)
[AAX only] This can be called by the ProTools API class (e.g.
void CreatePopupMenu(IControl &control, IPopupMenu &menu, const IRECT &bounds, int valIdx=0)
Shows a pop up/contextual menu in relation to a rectangular region of the graphics context.
void CreateTextEntry(IControl &control, const IText &text, const IRECT &bounds, const char *str="", int valIdx=0)
Create a text entry box.
@@ -3155,7 +3155,7 @@
void SetPTParameterHighlight(int paramIdx, bool isHighlighted, int color)
[AAX only] See AAX_CEffectGUI::SetControlHighlightInfo()
virtual void PathClose()=0
Close the path that is being specified.
void PathTransformTranslate(float x, float y)
Apply a translation transform to the current path.
-void ClearInTextEntryControl()
Called when the text entry is dismissed, to reset mInTextEntry.
+void ClearInTextEntryControl()
Called when the text entry is dismissed, to reset mInTextEntry.
void DrawRadialLine(const IColor &color, float cx, float cy, float angle, float rMin, float rMax, const IBlend *pBlend=0, float thickness=1.f)
Draw a radial line to the graphics context, useful for pointers on dials.
void PathRect(const IRECT &bounds)
Add a rectangle to the current path.
virtual void RetainBitmap(const IBitmap &bitmap, const char *cacheName)
Adds an IBitmap to the cache/static storage.
@@ -3176,13 +3176,13 @@
void OnMouseOut()
Called when the mouse leaves the graphics context.
void UpdatePeers(IControl *pCaller, int callerValIdx)
This method is called after interacting with a control, so that any other controls linked to the same...
void RemovePopupMenuControl()
Remove the IGraphics popup menu, use platform popup menu if available.
-virtual float GetBackingPixelScale() const
+virtual float GetBackingPixelScale() const
virtual void DrawRotatedBitmap(const IBitmap &bitmap, float destCentreX, float destCentreY, double angle, const IBlend *pBlend=0)
Draw a bitmap (raster) image to the graphics context with rotation.
bool OnKeyDown(float x, float y, const IKeyPress &key)
virtual int AlphaChannel() const =0
void AttachGestureRecognizerToRegion(const IRECT &bounds, EGestureType type, IGestureFunc func)
Attach a gesture recognizer to a rectangular region of the GUI, i.e.
-bool MultiTouchEnabled() const
-int Width() const
Gets the width of the graphics context.
+bool MultiTouchEnabled() const
+int Width() const
Gets the width of the graphics context.
virtual void EndFrame()
Called by some drawing API classes to finally blit the draw bitmap onto the screen or perform other c...
void DisableControl(int paramIdx, bool diable)
Disable or enable controls linked to a specific parameter.
void SetControlBounds(IControl *pControl, const IRECT &r)
Set a controls target and draw rect to r, redrawing the interface correctly.
@@ -3196,10 +3196,10 @@
void PathTransformReset(bool clearStates=false)
Reset the affine transform of the current path, to the default state.
void OnAppearanceChanged(EUIAppearance appearance)
Called by the platform class if the view changes to dark/light mode.
void CalculateTextRotation(const IText &text, const IRECT &bounds, IRECT &rect, double &tx, double &ty) const
-bool IsInPlatformTextEntry()
+bool IsInPlatformTextEntry()
virtual void PathStroke(const IPattern &pattern, float thickness, const IStrokeOptions &options=IStrokeOptions(), const IBlend *pBlend=0)=0
Stroke the current current path.
bool CheckLayer(const ILayerPtr &layer)
Test to see if a layer needs drawing, for instance if the control's bounds were changed.
-int WindowWidth() const
Gets the width of the graphics context including draw scaling.
+int WindowWidth() const
Gets the width of the graphics context including draw scaling.
void Draw(IRECTList &rects)
Called by the platform class indicating a number of rectangles in the UI that need to redraw.
EResourceLocation SearchImageResource(const char *fileName, const char *type, WDL_String &result, int targetScale, int &sourceScale)
Search for a bitmap image resource matching the target scale.
IControl * GetControlWithParamIdx(int paramIdx)
Get the first control with a parameter index that matches paramIdx.
@@ -3213,9 +3213,9 @@
int GetLastClickedParamForPTAutomation()
[AAX only]
void ForControlWithParam(int paramIdx, IControlFunction func)
For all standard controls in the main control stack that are linked to a specific parameter,...
void AttachBubbleControl(const IText &text=DEFAULT_TEXT)
Attach the default control to show text as a control changes.
-EUIResizerMode GetResizerMode() const
+EUIResizerMode GetResizerMode() const
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
-int GetRoundedScreenScale() const
Gets the screen/display scaling factor, rounded up.
+int GetRoundedScreenScale() const
Gets the screen/display scaling factor, rounded up.
APIBitmap * SearchBitmapInCache(const char *fileName, int targetScale, int &sourceScale)
Search the static storage cache for a bitmap image resource matching the target scale.
virtual void DrawLine(const IColor &color, float x1, float y1, float x2, float y2, const IBlend *pBlend=0, float thickness=1.f)
Draw a line to the graphics context.
virtual void DrawArc(const IColor &color, float cx, float cy, float r, float a1, float a2, const IBlend *pBlend=0, float thickness=1.f)
Draw an arc to the graphics context.
@@ -3230,7 +3230,7 @@
void RemoveAllControls()
Removes all regular IControls from the control list, as well as special controls (frees memory).
virtual void DrawCircle(const IColor &color, float cx, float cy, float r, const IBlend *pBlend=0, float thickness=1.f)
Draw a circle to the graphics context.
void OnMouseDown(const std::vector< IMouseInfo > &points)
Called when the platform class sends mouse down events.
-int Height() const
Gets the height of the graphics context.
+int Height() const
Gets the height of the graphics context.
void PathClipRegion(const IRECT r=IRECT())
Clip the current path to a particular region.
void PathCircle(float cx, float cy, float r)
Add a circle to the current path.
void PathRadialLine(float cx, float cy, float angle, float rMin, float rMax)
Add a radial line to the current path.
@@ -3243,8 +3243,8 @@
void ForAllControls(T method, Args... args)
For all controls, including the "special controls" call a method.
void ClearGestureRegions()
Remove all gesture recognizers linked to regions.
void SetControlValueAfterTextEdit(const char *str)
Called by the platform class after returning from a text entry in order to update a control with a ne...
-virtual void * GetWinModuleHandle()
-
+virtual void * GetWinModuleHandle()
+
virtual void UpdateLayer()
Implemented by a graphics backend to prepare for drawing to the layer at the top of the stack.
virtual void DrawData(const IColor &color, const IRECT &bounds, float *normYPoints, int nPoints, float *normXPoints=nullptr, const IBlend *pBlend=0, float thickness=1.f, const IColor *pFillColor=nullptr)
Draw a line between a collection of normalized points.
void SetQwertyMidiKeyHandlerFunc(std::function< void(const IMidiMsg &msg)> func=nullptr)
A helper to set the IGraphics KeyHandlerFunc in order to make an instrument playable via QWERTY keys.
@@ -3254,7 +3254,7 @@
virtual void DrawGrid(const IColor &color, const IRECT &bounds, float gridSizeH, float gridSizeV, const IBlend *pBlend=0, float thickness=1.f)
Draw a grid to the graphics context.
void SetAllControlsDirty()
Calls SetDirty() on every control.
virtual IBitmap ScaleBitmap(const IBitmap &inBitmap, const char *cacheName, int targetScale)
Returns a new IBitmap, an integer scaled version of the input, and adds it to the cache.
-IControl * GetControlInTextEntry()
+IControl * GetControlInTextEntry()
IBitmap GetScaledBitmap(IBitmap &inBitmap)
Get a version of the input bitmap from the cache that corresponds to the current screen scale For exa...
void AttachPanelBackground(const IPattern &color)
Attach an IPanelControl as the lowest IControl in the control stack to fill the background with a sol...
virtual void FillConvexPolygon(const IColor &color, float *x, float *y, int nPoints, const IBlend *pBlend=0)
Fill a convex polygon with a color.
@@ -3262,7 +3262,7 @@
void StyleAllVectorControls(const IVStyle &style)
Helper method to style all of the controls which inherit IVectorBase.
virtual IPopupMenu * CreatePlatformPopupMenu(IPopupMenu &menu, const IRECT bounds, bool &isAsync)=0
Calls the platform backend to create the platform popup menu.
void RemoveControlWithTag(int ctrlTag)
Remove controls from the control list with a particular tag.
-void GetTouches(IControl *pControl, std::vector< ITouchID > &touchesOnThisControl) const
Populate a vector with the touchIDs active on pControl.
+void GetTouches(IControl *pControl, std::vector< ITouchID > &touchesOnThisControl) const
Populate a vector with the touchIDs active on pControl.
void OnMouseWheel(float x, float y, const IMouseMod &mod, float delta)
void DrawVerticalLine(const IColor &color, const IRECT &bounds, float x, const IBlend *pBlend=0, float thickness=1.f)
Draw a vertical line, within a rectangular region of the graphics context.
virtual void PathMoveTo(float x, float y)=0
Move the current point in the current path.
@@ -3271,7 +3271,7 @@
virtual bool FlippedBitmap() const =0
void PromptUserInput(IControl &control, const IRECT &bounds, int valIdx=0)
Prompt for user input either using a text entry or pop up menu.
void SetControlSize(IControl *pControl, float w, float h)
Resize a control, redrawing the interface correctly.
-float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
+float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
virtual bool LoadAPIFont(const char *fontID, const PlatformFontPtr &font)=0
Drawing API method to load a font from a PlatformFontPtr, called internally.
void OnDropMultiple(const std::vector< const char * > &paths, float x, float y)
void AssignParamNameToolTips()
Call this method in order to create tool tips for every IControl that show the associated parameter's...
@@ -3284,22 +3284,22 @@
virtual void DoDrawText(const IText &text, const char *str, const IRECT &bounds, const IBlend *pBlend=nullptr)=0
void PathTransformSave()
Save the current affine transform of the current path.
virtual void FillArc(const IColor &color, float cx, float cy, float r, float a1, float a2, const IBlend *pBlend=0)
Fill an arc segment with a color.
-void SetKeyHandlerFunc(IKeyHandlerFunc func)
Set a function that is called when key presses are not intercepted by any controls.
+void SetKeyHandlerFunc(IKeyHandlerFunc func)
Set a function that is called when key presses are not intercepted by any controls.
virtual void DrawDottedLine(const IColor &color, float x1, float y1, float x2, float y2, const IBlend *pBlend=0, float thickness=1.f, float dashLen=2.f)
Draw a dotted line to the graphics context.
void RemoveTextEntryControl()
Remove the IGraphics text entry, use platform text entry if available.
void ShowFPSDisplay(bool enable)
Shows a control to display the frame rate of drawing.
virtual void PathLineTo(float x, float y)=0
Add a line to the current path from the current point to the specified location.
void DrawLineAcross(const IColor &color, const IRECT &bounds, EDirection dir, float pos, const IBlend *pBlend=0, float thickness=1.f)
Draw a horzional or vertical line, within a rectangular region of the graphics context.
-const char * GetSharedResourcesSubPath() const
Gets the name of the shared resources subpath.
+const char * GetSharedResourcesSubPath() const
Gets the name of the shared resources subpath.
void PathTransformSkew(float xAngle, float yAngle)
Apply a skew transform to the current path.
-float GetDrawScale() const
Gets the graphics context scaling factor.
+float GetDrawScale() const
Gets the graphics context scaling factor.
void DrawFittedLayer(const ILayerPtr &layer, const IRECT &bounds, const IBlend *pBlend)
Draw a layer to the main IGraphics context, fitting it to a rectangle that is different to the layer'...
void RemoveControls(int fromIdx)
Remove controls from the control list above a particular index, (frees memory).
void AttachBackground(const char *fileName)
Attach an IBitmapControl as the lowest IControl in the control stack to be the background for the gra...
void SetStrictDrawing(bool strict)
Enables strict drawing mode.
void OnGUIIdle()
This is an idle timer tick call on the GUI thread, only active if USE_IDLE_CALLS is defined.
-IGEditorDelegate * GetDelegate()
Gets a pointer to the delegate class that handles communication to and from this graphics context.
-IControl * GetControl(int idx)
Get the control at a certain index in the control stack.
+IGEditorDelegate * GetDelegate()
Gets a pointer to the delegate class that handles communication to and from this graphics context.
+IControl * GetControl(int idx)
Get the control at a certain index in the control stack.
void StartLayer(IControl *pOwner, const IRECT &r, bool cacheable=false)
Create an IGraphics layer.
void OnGestureRecognized(const IGestureInfo &info)
Called by platform class when a gesture is recognized.
virtual void CachePlatformFont(const char *fontID, const PlatformFontPtr &font)=0
Called to indicate that the platform should cache data about the platform font if needed.
@@ -3308,7 +3308,7 @@
void ForStandardControlsFunc(IControlFunction func)
For all standard controls in the main control stack perform a function.
virtual void DrawTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0, float thickness=1.f)
Draw a triangle to the graphics context.
virtual void PathCubicBezierTo(float c1x, float c1y, float c2x, float c2y, float x2, float y2)=0
Add a cubic bezier to the current path from the current point to the specified location.
-int WindowHeight() const
Gets the height of the graphics context including draw scaling.
+int WindowHeight() const
Gets the height of the graphics context including draw scaling.
void PathEllipse(const IRECT &bounds)
Add an ellipse to the current path, specifying the rectangular region.
virtual IBitmap LoadBitmap(const char *fileNameOrResID, int nStates=1, bool framesAreHorizontal=false, int targetScale=0)
Load a bitmap image from disk or from windows resource.
virtual void BeginFrame()
Called at the beginning of drawing.
@@ -3318,7 +3318,7 @@
ILayerPtr EndLayer()
End an IGraphics layer.
virtual WDL_TypedBuf< uint8_t > LoadResource(const char *fileNameOrResID, const char *fileType)
Load a resource from the file system, the bundle, or a Windows resource, and returns its data.
void OnDrop(const char *str, float x, float y)
-IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
+IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
IControl * AttachControl(IControl *pControl, int ctrlTag=kNoTag, const char *group="")
Attach an IControl to the graphics context and add it to the top of the control stack.
virtual void DrawBitmap(const IBitmap &bitmap, const IRECT &bounds, int srcX, int srcY, const IBlend *pBlend=0)=0
Draw a bitmap (raster) image to the graphics context.
virtual float MeasureText(const IText &text, const char *str, IRECT &bounds) const
Measure the rectangular region that some text will occupy.
diff --git a/_i_graphics_8h_source.html b/_i_graphics_8h_source.html
index 30d8319f..6464a063 100644
--- a/_i_graphics_8h_source.html
+++ b/_i_graphics_8h_source.html
@@ -434,529 +434,531 @@
-
-
- 877 virtual EMsgBoxResult
ShowMessageBox (
const char * str,
const char * caption, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler =
nullptr ) = 0;
-
- 885 virtual void PromptForFile (WDL_String& fileName, WDL_String& path, EFileAction action = EFileAction::Open,
const char * ext =
"" , IFileDialogCompletionHandlerFunc completionHandler =
nullptr ) = 0;
-
- 890 virtual void PromptForDirectory (WDL_String& dir, IFileDialogCompletionHandlerFunc completionHandler =
nullptr ) = 0;
-
-
-
- 905 virtual bool OpenURL (
const char * url,
const char * msgWindowTitle = 0,
const char * confirmMsg = 0,
const char * errMsgOnFailure = 0) = 0;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 940 virtual PlatformFontPtr
LoadPlatformFont (
const char * fontID,
const char * fileNameOrResID) = 0;
+
+
+
+
+ 883 virtual EMsgBoxResult
ShowMessageBox (
const char * str,
const char * caption, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler =
nullptr ) = 0;
+
+ 891 virtual void PromptForFile (WDL_String& fileName, WDL_String& path, EFileAction action = EFileAction::Open,
const char * ext =
"" , IFileDialogCompletionHandlerFunc completionHandler =
nullptr ) = 0;
+
+ 896 virtual void PromptForDirectory (WDL_String& dir, IFileDialogCompletionHandlerFunc completionHandler =
nullptr ) = 0;
+
+
+
+ 911 virtual bool OpenURL (
const char * url,
const char * msgWindowTitle = 0,
const char * confirmMsg = 0,
const char * errMsgOnFailure = 0) = 0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 947 virtual PlatformFontPtr
LoadPlatformFont (
const char * fontID,
void * pData,
int dataSize) = 0;
-
- 954 virtual PlatformFontPtr
LoadPlatformFont (
const char * fontID,
const char * fontName, ETextStyle style) = 0;
-
-
-
-
-
-
+ 946 virtual PlatformFontPtr
LoadPlatformFont (
const char * fontID,
const char * fileNameOrResID) = 0;
+
+ 953 virtual PlatformFontPtr
LoadPlatformFont (
const char * fontID,
void * pData,
int dataSize) = 0;
+
+ 960 virtual PlatformFontPtr
LoadPlatformFont (
const char * fontID,
const char * fontName, ETextStyle style) = 0;
+
+
-
-
- 969 virtual void ActivateGLContext() {};
-
-
- 972 virtual void DeactivateGLContext() {};
-
-
-
-
-
- 989 #pragma mark - Base implementation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 975 virtual void ActivateGLContext() {};
+
+
+ 978 virtual void DeactivateGLContext() {};
+
+
+
+
+
+ 995 #pragma mark - Base implementation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1064 void Resize (
int w,
int h,
float scale,
bool needsPlatformResize =
true );
-
-
-
-
- 1071 void SetLayoutOnResize(
bool layoutOnResize);
-
-
-
-
-
- 1083 int WindowWidth ()
const {
return static_cast< int > (
static_cast< float > (mWidth) * mDrawScale); }
-
- 1087 int WindowHeight ()
const {
return static_cast< int > (
static_cast< float > (mHeight) * mDrawScale); }
-
- 1091 int FPS ()
const {
return mFPS; }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1070 void Resize (
int w,
int h,
float scale,
bool needsPlatformResize =
true );
+
+
+
+
+ 1077 void SetLayoutOnResize(
bool layoutOnResize);
+
+
+
+
+
+ 1089 int WindowWidth ()
const {
return static_cast< int > (
static_cast< float > (mWidth) * mDrawScale); }
+
+ 1093 int WindowHeight ()
const {
return static_cast< int > (
static_cast< float > (mHeight) * mDrawScale); }
+
+ 1097 int FPS ()
const {
return mFPS; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
- 1145 mEnableMultiTouch = enable;
-
-
-
- 1149 mEnableMultiTouch =
false ;
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 1151 mEnableMultiTouch = enable;
+
+
+
+ 1155 mEnableMultiTouch =
false ;
-
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1219 virtual void PlatformResize(
bool parentHasResized) {}
-
- 1222 virtual void DrawResize() {}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 1227 void Draw (
const IRECT & bounds,
float scale);
-
- 1233 void DrawControl(
IControl * pControl,
const IRECT & bounds,
float scale);
+ 1225 virtual void PlatformResize(
bool parentHasResized) {}
+
+ 1228 virtual void DrawResize() {}
+
+ 1233 void Draw (
const IRECT & bounds,
float scale);
-
-
- 1244 void StartDragResize() { mResizingInProcess =
true ; }
-
- 1247 void EndDragResize();
-
- 1249 #pragma mark - Control management
-
-
-
- 1258 template <
typename T,
typename ... Args>
-
+ 1239 void DrawControl(
IControl * pControl,
const IRECT & bounds,
float scale);
+
+
+
+ 1250 void StartDragResize() { mResizingInProcess =
true ; }
+
+ 1253 void EndDragResize();
+
+ 1255 #pragma mark - Control management
+
+
-
-
- 1269 template <
typename T,
typename ... Args>
-
-
-
-
- 1280 void ForControlWithParam (
const std::initializer_list<int>& params, IControlFunction func);
-
-
-
-
-
-
-
-
-
- 1301 void AttachCornerResizer (EUIResizerMode sizeMode = EUIResizerMode::Scale,
bool layoutOnResize =
false ,
const IColor & color = COLOR_TRANSLUCENT,
const IColor & mouseOverColor = COLOR_BLACK,
const IColor & dragColor = COLOR_BLACK,
float size = 20.f);
-
-
-
-
-
-
-
-
+ 1264 template <
typename T,
typename ... Args>
+
+
+
+
+ 1275 template <
typename T,
typename ... Args>
+
+
+
+
+ 1286 void ForControlWithParam (
const std::initializer_list<int>& params, IControlFunction func);
+
+
+
+
+
+
+
+
+
+ 1307 void AttachCornerResizer (EUIResizerMode sizeMode = EUIResizerMode::Scale,
bool layoutOnResize =
false ,
const IColor & color = COLOR_TRANSLUCENT,
const IColor & mouseOverColor = COLOR_BLACK,
const IColor & dragColor = COLOR_BLACK,
float size = 20.f);
+
+
+
+
-
+
-
-
-
+
+
+
-
- 1329 void ShowBubbleControl(
IControl * pCaller,
float x,
float y,
const char * str, EDirection dir = EDirection::Horizontal,
IRECT minimumContentBounds =
IRECT ());
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1374 for (
auto itr = mCtrlTags.begin(); itr != mCtrlTags.end(); ++itr)
-
- 1376 if (itr->second == pControl)
-
-
-
-
-
-
-
-
-
-
-
-
- 1395 return std::find_if(std::begin(mCapturedMap), std::end(mCapturedMap), [pControl](
auto && press) {
return press.second == pControl; }) != mCapturedMap.end();
-
-
-
+
+
+
+ 1335 void ShowBubbleControl(
IControl * pCaller,
float x,
float y,
const char * str, EDirection dir = EDirection::Horizontal,
IRECT minimumContentBounds =
IRECT ());
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1380 for (
auto itr = mCtrlTags.begin(); itr != mCtrlTags.end(); ++itr)
+
+ 1382 if (itr->second == pControl)
+
+
+
+
+
+
+
+
+
+
+
- 1401 for (
auto i = mCapturedMap.begin(), j = mCapturedMap.end(); i != j; ++i)
- 1402 if (i->second == pControl)
- 1403 touchesOnThisControl.push_back(i->first);
-
-
-
-
-
-
+ 1401 return std::find_if(std::begin(mCapturedMap), std::end(mCapturedMap), [pControl](
auto && press) {
return press.second == pControl; }) != mCapturedMap.end();
+
+
+
+
+ 1407 for (
auto i = mCapturedMap.begin(), j = mCapturedMap.end(); i != j; ++i)
+ 1408 if (i->second == pControl)
+ 1409 touchesOnThisControl.push_back(i->first);
+
-
+
+
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- 1487 int GetMouseControlIdx(
float x,
float y,
bool mouseOver =
false );
-
- 1496 IControl * GetMouseControl(
float x,
float y,
bool capture,
bool mouseOver =
false , ITouchID touchID = 0);
-
- 1498 #pragma mark - Event handling
-
- 1501 void OnMouseDown (
const std::vector<IMouseInfo>& points);
-
- 1504 void OnMouseUp (
const std::vector<IMouseInfo>& points);
-
- 1507 void OnMouseDrag (
const std::vector<IMouseInfo>& points);
-
-
+
+
+
+
+
+ 1493 int GetMouseControlIdx(
float x,
float y,
bool mouseOver =
false );
+
+ 1502 IControl * GetMouseControl(
float x,
float y,
bool capture,
bool mouseOver =
false , ITouchID touchID = 0);
+
+ 1504 #pragma mark - Event handling
+
+ 1507 void OnMouseDown (
const std::vector<IMouseInfo>& points);
+
+ 1510 void OnMouseUp (
const std::vector<IMouseInfo>& points);
-
+ 1513 void OnMouseDrag (
const std::vector<IMouseInfo>& points);
+
+
-
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
- 1551 void OnDrop (
const char * str,
float x,
float y);
-
- 1556 void OnDropMultiple (
const std::vector<const char*>& paths,
float x,
float y);
-
-
-
-
+
+
+
+
+ 1557 void OnDrop (
const char * str,
float x,
float y);
+
+ 1562 void OnDropMultiple (
const std::vector<const char*>& paths,
float x,
float y);
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
- 1592 #pragma mark - Plug-in API Specific
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 1598 #pragma mark - Plug-in API Specific
+
+
+
+
-
-
-
-
- 1627 #pragma mark - Resource/File Loading
-
-
-
-
+
+
+
+
+
+
+ 1633 #pragma mark - Resource/File Loading
- 1641 virtual IBitmap LoadBitmap (
const char * fileNameOrResID,
int nStates = 1,
bool framesAreHorizontal =
false ,
int targetScale = 0);
-
- 1651 virtual IBitmap LoadBitmap (
const char *name,
const void * pData,
int dataSize,
int nStates = 1,
bool framesAreHorizontal =
false ,
int targetScale = 0);
-
- 1656 virtual ISVG LoadSVG (
const char * fileNameOrResID,
const char * units =
"px" ,
float dpi = 72.f);
-
- 1665 virtual ISVG LoadSVG (
const char * name,
const void * pData,
int dataSize,
const char * units =
"px" ,
float dpi = 72.f);
-
- 1671 virtual WDL_TypedBuf<uint8_t>
LoadResource (
const char * fileNameOrResID,
const char * fileType);
+
+
+
+
+ 1647 virtual IBitmap LoadBitmap (
const char * fileNameOrResID,
int nStates = 1,
bool framesAreHorizontal =
false ,
int targetScale = 0);
+
+ 1657 virtual IBitmap LoadBitmap (
const char *name,
const void * pData,
int dataSize,
int nStates = 1,
bool framesAreHorizontal =
false ,
int targetScale = 0);
+
+ 1662 virtual ISVG LoadSVG (
const char * fileNameOrResID,
const char * units =
"px" ,
float dpi = 72.f);
+
+ 1671 virtual ISVG LoadSVG (
const char * name,
const void * pData,
int dataSize,
const char * units =
"px" ,
float dpi = 72.f);
-
-
-
+ 1677 virtual WDL_TypedBuf<uint8_t>
LoadResource (
const char * fileNameOrResID,
const char * fileType);
+
+
-
-
-
-
-
-
-
-
-
- 1716 virtual bool LoadAPIFont (
const char * fontID,
const PlatformFontPtr& font) = 0;
+
+
+
+
+
+
+
+
+
+
-
-
-
+ 1722 virtual bool LoadAPIFont (
const char * fontID,
const PlatformFontPtr& font) = 0;
-
-
- 1734 EResourceLocation
SearchImageResource (
const char * fileName,
const char * type, WDL_String& result,
int targetScale,
int & sourceScale);
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1774 IMatrix GetTransformMatrix()
const {
return mTransform; }
-
-
-
- 1778 void ClearMouseOver()
-
- 1780 mMouseOver =
nullptr ;
-
-
-
- 1784 WDL_PtrList<IControl> mControls;
- 1785 std::unordered_map<int, IControl*> mCtrlTags;
-
-
- 1788 std::unique_ptr<ICornerResizerControl> mCornerResizer;
- 1789 WDL_PtrList<IBubbleControl> mBubbleControls;
- 1790 std::unique_ptr<IPopupMenuControl> mPopupControl;
- 1791 std::unique_ptr<IFPSDisplayControl> mPerfDisplay;
- 1792 std::unique_ptr<ITextEntryControl> mTextEntryControl;
- 1793 std::unique_ptr<IControl> mLiveEdit;
-
-
-
- 1797 WDL_String mSharedResourcesSubPath;
-
- 1799 ECursor mCursorType = ECursor::ARROW;
-
-
-
- 1803 float mScreenScale = 1.f;
- 1804 float mDrawScale = 1.f;
-
-
-
- 1808 std::vector<EGestureType> mRegisteredGestures;
-
- 1810 std::unordered_map<int, IGestureFunc> mGestureRegionFuncs;
- 1811 std::unordered_map<ITouchID, IControl*> mCapturedMap;
-
-
-
- 1815 void * mPlatformContext =
nullptr ;
- 1816 bool mIsContextMenu =
false ;
- 1817 int mTextEntryValIdx = kNoValIdx;
- 1818 int mPopupMenuValIdx = kNoValIdx;
- 1819 int mMouseOverIdx = -1;
- 1820 float mMouseDownX = -1.f;
- 1821 float mMouseDownY = -1.f;
-
-
- 1824 int mLastClickedParam = kNoParameter;
- 1825 bool mEnableMouseOver =
false ;
- 1826 bool mStrict =
false ;
- 1827 bool mEnableTooltips =
false ;
- 1828 bool mShowControlBounds =
false ;
- 1829 bool mShowAreaDrawn =
false ;
- 1830 bool mResizingInProcess =
false ;
- 1831 bool mLayoutOnResize =
false ;
- 1832 bool mEnableMultiTouch =
false ;
- 1833 EUIResizerMode mGUISizeMode = EUIResizerMode::Scale;
- 1834 double mPrevTimestamp = 0.;
- 1835 IKeyHandlerFunc mKeyHandlerFunc =
nullptr ;
- 1836 IDisplayTickFunc mDisplayTickFunc =
nullptr ;
- 1837 IUIAppearanceChangedFunc mAppearanceChangedFunc =
nullptr ;
-
-
-
- 1841 bool mCursorHidden =
false ;
- 1842 bool mCursorLock =
false ;
- 1843 bool mTabletInput =
false ;
- 1844 float mCursorX = -1.f;
- 1845 float mCursorY = -1.f;
- 1846 float mXTranslation = 0.f;
- 1847 float mYTranslation = 0.f;
-
-
-
-
-
- 1853 std::stack<ILayer*> mLayers;
-
-
-
- 1857 std::stack<IMatrix> mTransformStates;
-
-
- 1860 END_IGRAPHICS_NAMESPACE
-
+
+
+
+
+
+
+ 1740 EResourceLocation
SearchImageResource (
const char * fileName,
const char * type, WDL_String& result,
int targetScale,
int & sourceScale);
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1780 IMatrix GetTransformMatrix()
const {
return mTransform; }
+
+
+
+ 1784 void ClearMouseOver()
+
+ 1786 mMouseOver =
nullptr ;
+
+
+
+ 1790 WDL_PtrList<IControl> mControls;
+ 1791 std::unordered_map<int, IControl*> mCtrlTags;
+
+
+ 1794 std::unique_ptr<ICornerResizerControl> mCornerResizer;
+ 1795 WDL_PtrList<IBubbleControl> mBubbleControls;
+ 1796 std::unique_ptr<IPopupMenuControl> mPopupControl;
+ 1797 std::unique_ptr<IFPSDisplayControl> mPerfDisplay;
+ 1798 std::unique_ptr<ITextEntryControl> mTextEntryControl;
+ 1799 std::unique_ptr<IControl> mLiveEdit;
+
+
+
+ 1803 WDL_String mSharedResourcesSubPath;
+
+ 1805 ECursor mCursorType = ECursor::ARROW;
+
+
+
+ 1809 float mScreenScale = 1.f;
+ 1810 float mDrawScale = 1.f;
+
+
+
+ 1814 std::vector<EGestureType> mRegisteredGestures;
+
+ 1816 std::unordered_map<int, IGestureFunc> mGestureRegionFuncs;
+ 1817 std::unordered_map<ITouchID, IControl*> mCapturedMap;
+
+
+
+ 1821 void * mPlatformContext =
nullptr ;
+ 1822 bool mIsContextMenu =
false ;
+ 1823 int mTextEntryValIdx = kNoValIdx;
+ 1824 int mPopupMenuValIdx = kNoValIdx;
+ 1825 int mMouseOverIdx = -1;
+ 1826 float mMouseDownX = -1.f;
+ 1827 float mMouseDownY = -1.f;
+
+
+ 1830 int mLastClickedParam = kNoParameter;
+ 1831 bool mEnableMouseOver =
false ;
+ 1832 bool mStrict =
false ;
+ 1833 bool mEnableTooltips =
false ;
+ 1834 bool mShowControlBounds =
false ;
+ 1835 bool mShowAreaDrawn =
false ;
+ 1836 bool mResizingInProcess =
false ;
+ 1837 bool mLayoutOnResize =
false ;
+ 1838 bool mEnableMultiTouch =
false ;
+ 1839 EUIResizerMode mGUISizeMode = EUIResizerMode::Scale;
+ 1840 double mPrevTimestamp = 0.;
+ 1841 IKeyHandlerFunc mKeyHandlerFunc =
nullptr ;
+ 1842 IDisplayTickFunc mDisplayTickFunc =
nullptr ;
+ 1843 IUIAppearanceChangedFunc mAppearanceChangedFunc =
nullptr ;
+
+
+
+ 1847 bool mCursorHidden =
false ;
+ 1848 bool mCursorLock =
false ;
+ 1849 bool mTabletInput =
false ;
+ 1850 float mCursorX = -1.f;
+ 1851 float mCursorY = -1.f;
+ 1852 float mXTranslation = 0.f;
+ 1853 float mYTranslation = 0.f;
+
+
+
+
+
+ 1859 std::stack<ILayer*> mLayers;
+
+
+
+ 1863 std::stack<IMatrix> mTransformStates;
+
+
+ 1866 END_IGRAPHICS_NAMESPACE
+
IPlug Constant definitions, Types, magic numbers.
@@ -970,16 +972,16 @@
Performance display meter, based on code from NanoVG This is a special control that lives outside the...
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
The lowest level base class of an IGraphics context.
-bool ControlIsCaptured() const
Check to see if any control is captured.
+bool ControlIsCaptured() const
Check to see if any control is captured.
void EnableTooltips(bool enable)
-void CreatePopupMenu(IControl &control, IPopupMenu &menu, float x, float y, int valIdx=0)
Shows a pop up/contextual menu at point.
+void CreatePopupMenu(IControl &control, IPopupMenu &menu, float x, float y, int valIdx=0)
Shows a pop up/contextual menu at point.
virtual float DoMeasureText(const IText &text, const char *str, IRECT &bounds) const =0
virtual bool SetFilePathInClipboard(const char *path)
Set a file path in the clipboard.
-virtual void ClientToScreen(float &x, float &y)
Convert an x, y position in the view to screen coordinates.
+virtual void ClientToScreen(float &x, float &y)
Convert an x, y position in the view to screen coordinates.
void Resize(int w, int h, float scale, bool needsPlatformResize=true)
virtual void DrawRotatedSVG(const ISVG &svg, float destCentreX, float destCentreY, float width, float height, double angle, const IBlend *pBlend=0)
Draw an SVG image to the graphics context with rotation.
virtual void DrawRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f)
Draw a rectangle to the graphics context.
-virtual bool PlatformSupportsMultiTouch() const
+virtual bool PlatformSupportsMultiTouch() const
virtual void FillEllipse(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill an ellipse within a rectangular region of the graphics context.
ILayer * PopLayer()
Pop a layer off the stack.
virtual void DrawConvexPolygon(const IColor &color, float *x, float *y, int nPoints, const IBlend *pBlend=0, float thickness=1.f)
Draw a convex polygon to the graphics context.
@@ -991,18 +993,19 @@
void AttachPopupMenuControl(const IText &text=DEFAULT_TEXT, const IRECT &bounds=IRECT())
Attach a control for pop-up menus, to override platform style menus.
virtual void DrawPoint(const IColor &color, float x, float y, const IBlend *pBlend=0)
Fill a rectangle corresponding to a pixel on a 1:1 screen with a color.
void RemoveControl(int idx)
Remove a control at a particular index, (frees memory).
-virtual const char * GetBundleID() const
Get the bundle ID on macOS and iOS, returns emtpy string on other OSs.
+virtual const char * GetBundleID() const
Get the bundle ID on macOS and iOS, returns emtpy string on other OSs.
void PathConvexPolygon(float *x, float *y, int nPoints)
Add a convex polygon to the current path.
virtual void PathFill(const IPattern &pattern, const IFillOptions &options=IFillOptions(), const IBlend *pBlend=0)=0
Fill the current current path.
-void SetTabletInput(bool tablet)
Set by the platform class if the mouse input is coming from a tablet/stylus.
-virtual float GetPlatformWindowScale() const
Returns a scaling factor for resizing parent windows via the host/plugin API.
+void SetTabletInput(bool tablet)
Set by the platform class if the mouse input is coming from a tablet/stylus.
+virtual float GetPlatformWindowScale() const
Returns a scaling factor for resizing parent windows via the host/plugin API.
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.
-float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
+float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
int GetParamIdxForPTAutomation(float x, float y)
[AAX only] This can be called by the ProTools API class (e.g.
virtual IColor GetPoint(int x, int y)=0
Get the color at an X, Y location in the graphics context.
void CreatePopupMenu(IControl &control, IPopupMenu &menu, const IRECT &bounds, int valIdx=0)
Shows a pop up/contextual menu in relation to a rectangular region of the graphics context.
void CreateTextEntry(IControl &control, const IText &text, const IRECT &bounds, const char *str="", int valIdx=0)
Create a text entry box.
virtual void PathClear()=0
Clear the stack of path drawing commands.
+virtual bool InitiateExternalFileDragDrop(const char *path, const IRECT &iconBounds)
Initiate an drag-n-drop operation of an existing file, to be dropped outside of the current window.
virtual void MoveMouseCursor(float x, float y)=0
Force move the mouse cursor to a specific position.
virtual void * GetDrawContext()=0
Gets a void pointer to underlying drawing context, for the IGraphics backend See draw class implement...
virtual PlatformFontPtr LoadPlatformFont(const char *fontID, void *pData, int dataSize)=0
Load a font from data in memory.
@@ -1010,7 +1013,7 @@
void SetPTParameterHighlight(int paramIdx, bool isHighlighted, int color)
[AAX only] See AAX_CEffectGUI::SetControlHighlightInfo()
virtual void PathClose()=0
Close the path that is being specified.
void PathTransformTranslate(float x, float y)
Apply a translation transform to the current path.
-void ClearInTextEntryControl()
Called when the text entry is dismissed, to reset mInTextEntry.
+void ClearInTextEntryControl()
Called when the text entry is dismissed, to reset mInTextEntry.
void DrawRadialLine(const IColor &color, float cx, float cy, float angle, float rMin, float rMax, const IBlend *pBlend=0, float thickness=1.f)
Draw a radial line to the graphics context, useful for pointers on dials.
void PathRect(const IRECT &bounds)
Add a rectangle to the current path.
virtual void RetainBitmap(const IBitmap &bitmap, const char *cacheName)
Adds an IBitmap to the cache/static storage.
@@ -1019,11 +1022,11 @@
virtual void AttachPlatformView(const IRECT &r, void *pView)
Add an OS view as a sub-view, on top of the IGraphics view.
virtual void CreatePlatformTextEntry(int paramIdx, const IText &text, const IRECT &bounds, int length, const char *str)=0
Creates a platform native text entry field.
void ResumeLayer(ILayerPtr &layer)
If a layer already exists, continue drawing to it.
-ITextEntryControl * GetTextEntryControl()
+ITextEntryControl * GetTextEntryControl()
void PathTransformMatrix(const IMatrix &matrix)
Apply an arbitary affine transform matrix to the current path.
void DrawRotatedLayer(const ILayerPtr &layer, double angle)
Draw a layer to the main IGraphics context, with rotation.
-virtual const char * GetAppGroupID() const
Get the app group ID on macOS and iOS, returns emtpy string on other OSs.
-int FPS() const
Gets the drawing frame rate.
+virtual const char * GetAppGroupID() const
Get the app group ID on macOS and iOS, returns emtpy string on other OSs.
+int FPS() const
Gets the drawing frame rate.
void PathTransformScale(float x, float y)
Apply a scale transform to the current path, with independant x, y scales.
virtual ECursor SetMouseCursor(ECursor cursorType=ECursor::ARROW)
Sets the mouse cursor to one of ECursor (implementations should return the result of the base impleme...
void PathLine(float x1, float y1, float x2, float y2)
Add a line to the current path.
@@ -1034,21 +1037,21 @@
virtual void HidePlatformView(void *pView, bool hide)
Hide a previously attached platform view from the IGraphics view.
void OnMouseDrag(const std::vector< IMouseInfo > &points)
Called when the platform class sends drag events.
virtual void ReleaseBitmap(const IBitmap &bitmap)
Releases an IBitmap from the cache/static storage.
-void ShowControlBounds(bool enable)
+void ShowControlBounds(bool enable)
virtual void DrawRoundRect(const IColor &color, const IRECT &bounds, float cornerRadius=5.f, const IBlend *pBlend=0, float thickness=1.f)
Draw a rounded rectangle to the graphics context.
-void SetUIAppearanceChangedFunc(IUIAppearanceChangedFunc func)
Sets a function that is called when the OS appearance (light/dark mode) is changed.
+void SetUIAppearanceChangedFunc(IUIAppearanceChangedFunc func)
Sets a function that is called when the OS appearance (light/dark mode) is changed.
void OnMouseOut()
Called when the mouse leaves the graphics context.
void UpdatePeers(IControl *pCaller, int callerValIdx)
This method is called after interacting with a control, so that any other controls linked to the same...
void RemovePopupMenuControl()
Remove the IGraphics popup menu, use platform popup menu if available.
-virtual float GetBackingPixelScale() const
+virtual float GetBackingPixelScale() const
virtual void DrawRotatedBitmap(const IBitmap &bitmap, float destCentreX, float destCentreY, double angle, const IBlend *pBlend=0)
Draw a bitmap (raster) image to the graphics context with rotation.
bool OnKeyDown(float x, float y, const IKeyPress &key)
virtual int AlphaChannel() const =0
void AttachGestureRecognizerToRegion(const IRECT &bounds, EGestureType type, IGestureFunc func)
Attach a gesture recognizer to a rectangular region of the GUI, i.e.
-bool MultiTouchEnabled() const
+bool MultiTouchEnabled() const
virtual const char * GetDrawingAPIStr()=0
-int Width() const
Gets the width of the graphics context.
-virtual void SetWinModuleHandle(void *pHinstance)
Used on Windows to set the HINSTANCE module handle, which allows graphics APIs to load resources from...
+int Width() const
Gets the width of the graphics context.
+virtual void SetWinModuleHandle(void *pHinstance)
Used on Windows to set the HINSTANCE module handle, which allows graphics APIs to load resources from...
virtual void EndFrame()
Called by some drawing API classes to finally blit the draw bitmap onto the screen or perform other c...
void DisableControl(int paramIdx, bool diable)
Disable or enable controls linked to a specific parameter.
virtual bool GetTextFromClipboard(WDL_String &str)=0
Get text from the clipboard.
@@ -1065,13 +1068,13 @@
virtual void * OpenWindow(void *pParentWnd)=0
Open a new platform view for this graphics context.
virtual void PromptForDirectory(WDL_String &dir, IFileDialogCompletionHandlerFunc completionHandler=nullptr)=0
Create a platform file prompt dialog to choose a directory path for opening/saving a directory.
void CalculateTextRotation(const IText &text, const IRECT &bounds, IRECT &rect, double &tx, double &ty) const
-bool IsInPlatformTextEntry()
-void SetTranslation(float x, float y)
Called by some platform IGraphics classes in order to translate the graphics context,...
-int GetIdxOfTaggedControl(int ctrlTag) const
Gets the index of a tagged control.
-virtual bool AssetsLoaded()
Specialized in IGraphicsCanvas drawing backend.
+bool IsInPlatformTextEntry()
+void SetTranslation(float x, float y)
Called by some platform IGraphics classes in order to translate the graphics context,...
+int GetIdxOfTaggedControl(int ctrlTag) const
Gets the index of a tagged control.
+virtual bool AssetsLoaded()
Specialized in IGraphicsCanvas drawing backend.
virtual void PathStroke(const IPattern &pattern, float thickness, const IStrokeOptions &options=IStrokeOptions(), const IBlend *pBlend=0)=0
Stroke the current current path.
bool CheckLayer(const ILayerPtr &layer)
Test to see if a layer needs drawing, for instance if the control's bounds were changed.
-int WindowWidth() const
Gets the width of the graphics context including draw scaling.
+int WindowWidth() const
Gets the width of the graphics context including draw scaling.
void Draw(IRECTList &rects)
Called by the platform class indicating a number of rectangles in the UI that need to redraw.
EResourceLocation SearchImageResource(const char *fileName, const char *type, WDL_String &result, int targetScale, int &sourceScale)
Search for a bitmap image resource matching the target scale.
IControl * GetControlWithParamIdx(int paramIdx)
Get the first control with a parameter index that matches paramIdx.
@@ -1083,20 +1086,20 @@
void DrawLayer(const ILayerPtr &layer, const IBlend *pBlend=nullptr)
Draw a layer to the main IGraphics context.
void PushLayer(ILayer *pLayer)
Push a layer on to the stack.
void ReleaseMouseCapture()
Used to tell the graphics context to stop tracking mouse interaction with a control.
-IRECT GetPixelSnapped(IRECT &r) const
Gets the nearest backing pixel aligned rect to the input IRECT.
+IRECT GetPixelSnapped(IRECT &r) const
Gets the nearest backing pixel aligned rect to the input IRECT.
int GetLastClickedParamForPTAutomation()
[AAX only]
void ForControlWithParam(int paramIdx, IControlFunction func)
For all standard controls in the main control stack that are linked to a specific parameter,...
-bool ShowAreaDrawnEnabled() const
+bool ShowAreaDrawnEnabled() const
void AttachBubbleControl(const IText &text=DEFAULT_TEXT)
Attach the default control to show text as a control changes.
-IBubbleControl * GetBubbleControl(int i=0)
-EUIResizerMode GetResizerMode() const
+IBubbleControl * GetBubbleControl(int i=0)
+EUIResizerMode GetResizerMode() const
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
-int GetRoundedScreenScale() const
Gets the screen/display scaling factor, rounded up.
+int GetRoundedScreenScale() const
Gets the screen/display scaling factor, rounded up.
virtual void DrawFastDropShadow(const IRECT &innerBounds, const IRECT &outerBounds, float xyDrop=5.f, float roundness=0.f, float blur=10.f, IBlend *pBlend=nullptr)
NanoVG only.
virtual bool PromptForColor(IColor &color, const char *str="", IColorPickerHandlerFunc func=nullptr)=0
Create a platform color chooser dialog.
APIBitmap * SearchBitmapInCache(const char *fileName, int targetScale, int &sourceScale)
Search the static storage cache for a bitmap image resource matching the target scale.
-void * GetPlatformContext()
Get the platform level draw context - an HDC or CGContextRef.
-virtual bool RevealPathInExplorerOrFinder(WDL_String &path, bool select=false)
+void * GetPlatformContext()
Get the platform level draw context - an HDC or CGContextRef.
+virtual bool RevealPathInExplorerOrFinder(WDL_String &path, bool select=false)
virtual void DrawLine(const IColor &color, float x1, float y1, float x2, float y2, const IBlend *pBlend=0, float thickness=1.f)
Draw a line to the graphics context.
virtual void DrawArc(const IColor &color, float cx, float cy, float r, float a1, float a2, const IBlend *pBlend=0, float thickness=1.f)
Draw an arc to the graphics context.
void OnTouchCancelled(const std::vector< IMouseInfo > &points)
Called when the platform class sends touch cancel events.
@@ -1105,22 +1108,22 @@
void OnDragResize(float x, float y)
Called by ICornerResizerControl as the corner is dragged to resize.
virtual PlatformFontPtr LoadPlatformFont(const char *fontID, const char *fileNameOrResID)=0
Load a font from disk or resource in a platform format.
void ForAllControlsFunc(IControlFunction func)
For all controls, including the "special controls" call a method.
-int NBubbleControls() const
+int NBubbleControls() const
void HideControl(int paramIdx, bool hide)
Hide controls linked to a specific parameter.
virtual bool LoadFont(const char *fontID, const char *fileNameOrResID)
Load a font to be used by the graphics context.
-void SetDisplayTickFunc(IDisplayTickFunc func)
Sets a function that is called at the frame rate, prior to checking for dirty controls.
+void SetDisplayTickFunc(IDisplayTickFunc func)
Sets a function that is called at the frame rate, prior to checking for dirty controls.
virtual bool BitmapExtSupported(const char *ext)=0
Checks a file extension and reports whether this drawing API supports loading that extension.
void RemoveAllControls()
Removes all regular IControls from the control list, as well as special controls (frees memory).
virtual void DrawCircle(const IColor &color, float cx, float cy, float r, const IBlend *pBlend=0, float thickness=1.f)
Draw a circle to the graphics context.
-bool LiveEditEnabled() const
+bool LiveEditEnabled() const
void OnMouseDown(const std::vector< IMouseInfo > &points)
Called when the platform class sends mouse down events.
-void GetMouseDownPoint(float &x, float &y) const
Get the x, y position of the last mouse down message.
-int Height() const
Gets the height of the graphics context.
+void GetMouseDownPoint(float &x, float &y) const
Get the x, y position of the last mouse down message.
+int Height() const
Gets the height of the graphics context.
void PathClipRegion(const IRECT r=IRECT())
Clip the current path to a particular region.
void PathCircle(float cx, float cy, float r)
Add a circle to the current path.
void PathRadialLine(float cx, float cy, float angle, float rMin, float rMax)
Add a radial line to the current path.
void PathTransformRotate(float angle)
Apply a rotation transform to the current path.
-bool GetResizingInProcess() const
+bool GetResizingInProcess() const
bool OnKeyUp(float x, float y, const IKeyPress &key)
bool IsDirty(IRECTList &rects)
Called repeatedly at frame rate by the platform class to check what the graphics context says is dirt...
virtual void FillRoundRect(const IColor &color, const IRECT &bounds, float cornerRadius=5.f, const IBlend *pBlend=0)
Fill a rounded rectangle with a color.
@@ -1130,11 +1133,11 @@
void ForAllControls(T method, Args... args)
For all controls, including the "special controls" call a method.
void ClearGestureRegions()
Remove all gesture recognizers linked to regions.
void SetControlValueAfterTextEdit(const char *str)
Called by the platform class after returning from a text entry in order to update a control with a ne...
-bool ControlIsCaptured(IControl *pControl) const
Check to see if the control is already captured.
+bool ControlIsCaptured(IControl *pControl) const
Check to see if the control is already captured.
virtual void GetMouseLocation(float &x, float &y) const =0
Get the x, y position of the mouse cursor.
virtual void DrawMultiLineText(const IText &text, const char *str, IRECT &bounds, const IBlend *pBlend=0)
Draw some multi-line text to the graphics context in a specific rectangle (NanoVG only)
-virtual void * GetWinModuleHandle()
-
+virtual void * GetWinModuleHandle()
+
virtual void UpdateLayer()
Implemented by a graphics backend to prepare for drawing to the layer at the top of the stack.
virtual void DrawData(const IColor &color, const IRECT &bounds, float *normYPoints, int nPoints, float *normXPoints=nullptr, const IBlend *pBlend=0, float thickness=1.f, const IColor *pFillColor=nullptr)
Draw a line between a collection of normalized points.
void SetQwertyMidiKeyHandlerFunc(std::function< void(const IMidiMsg &msg)> func=nullptr)
A helper to set the IGraphics KeyHandlerFunc in order to make an instrument playable via QWERTY keys.
@@ -1142,11 +1145,11 @@
virtual void FillTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0)
Fill a triangle with a color.
void ApplyLayerDropShadow(ILayerPtr &layer, const IShadow &shadow)
Applies a drop shadow directly onto a layer.
virtual void DrawGrid(const IColor &color, const IRECT &bounds, float gridSizeH, float gridSizeV, const IBlend *pBlend=0, float thickness=1.f)
Draw a grid to the graphics context.
-void SetSharedResourcesSubPath(const char *sharedResourcesSubPath)
Sets the name of the shared resources subpath.
-
+void SetSharedResourcesSubPath(const char *sharedResourcesSubPath)
Sets the name of the shared resources subpath.
+
void SetAllControlsDirty()
Calls SetDirty() on every control.
virtual IBitmap ScaleBitmap(const IBitmap &inBitmap, const char *cacheName, int targetScale)
Returns a new IBitmap, an integer scaled version of the input, and adds it to the cache.
-IControl * GetControlInTextEntry()
+IControl * GetControlInTextEntry()
IBitmap GetScaledBitmap(IBitmap &inBitmap)
Get a version of the input bitmap from the cache that corresponds to the current screen scale For exa...
void AttachPanelBackground(const IPattern &color)
Attach an IPanelControl as the lowest IControl in the control stack to fill the background with a sol...
virtual void FillConvexPolygon(const IColor &color, float *x, float *y, int nPoints, const IBlend *pBlend=0)
Fill a convex polygon with a color.
@@ -1156,7 +1159,7 @@
virtual IPopupMenu * CreatePlatformPopupMenu(IPopupMenu &menu, const IRECT bounds, bool &isAsync)=0
Calls the platform backend to create the platform popup menu.
void RemoveControlWithTag(int ctrlTag)
Remove controls from the control list with a particular tag.
virtual void RemovePlatformView(void *pView)
Remove a previously attached platform view from the IGraphics view.
-void GetTouches(IControl *pControl, std::vector< ITouchID > &touchesOnThisControl) const
Populate a vector with the touchIDs active on pControl.
+void GetTouches(IControl *pControl, std::vector< ITouchID > &touchesOnThisControl) const
Populate a vector with the touchIDs active on pControl.
void OnMouseWheel(float x, float y, const IMouseMod &mod, float delta)
void DrawVerticalLine(const IColor &color, const IRECT &bounds, float x, const IBlend *pBlend=0, float thickness=1.f)
Draw a vertical line, within a rectangular region of the graphics context.
virtual void PathMoveTo(float x, float y)=0
Move the current point in the current path.
@@ -1164,14 +1167,14 @@
void PopupHostContextMenuForParam(int controlIdx, int paramIdx, float x, float y)
[VST3 primarily] In VST3 plug-ins this enable support for the IContextMenu interface,...
virtual bool FlippedBitmap() const =0
void PromptUserInput(IControl &control, const IRECT &bounds, int valIdx=0)
Prompt for user input either using a text entry or pop up menu.
-virtual const char * GetPlatformAPIStr()
+virtual const char * GetPlatformAPIStr()
void SetControlSize(IControl *pControl, float w, float h)
Resize a control, redrawing the interface correctly.
-float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
+float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
virtual bool LoadAPIFont(const char *fontID, const PlatformFontPtr &font)=0
Drawing API method to load a font from a PlatformFontPtr, called internally.
-bool ShowControlBoundsEnabled() const
+bool ShowControlBoundsEnabled() const
void OnDropMultiple(const std::vector< const char * > &paths, float x, float y)
void AssignParamNameToolTips()
Call this method in order to create tool tips for every IControl that show the associated parameter's...
-bool EnableMultiTouch(bool enable)
Enable/disable multi touch, if platform supports it.
+bool EnableMultiTouch(bool enable)
Enable/disable multi touch, if platform supports it.
virtual ISVG LoadSVG(const char *fileNameOrResID, const char *units="px", float dpi=72.f)
Load an SVG from disk or from windows resource.
virtual APIBitmap * LoadAPIBitmap(const char *fileNameOrResID, int scale, EResourceLocation location, const char *ext)=0
Drawing API method to load a bitmap, called internally.
virtual void HideMouseCursor(bool hide=true, bool lock=true)=0
Call to hide/show the mouse cursor.
@@ -1180,60 +1183,60 @@
void DrawHorizontalLine(const IColor &color, const IRECT &bounds, float y, const IBlend *pBlend=0, float thickness=1.f)
Draw a horizontal line, within a rectangular region of the graphics context.
void ForControlInGroup(const char *group, IControlFunction func)
For all standard controls in the main control stack that are linked to a group, execute a function.
virtual void DoDrawText(const IText &text, const char *str, const IRECT &bounds, const IBlend *pBlend=nullptr)=0
-virtual EUIAppearance GetUIAppearance() const
Get the UI Appearance (Light/Dark mode)
+virtual EUIAppearance GetUIAppearance() const
Get the UI Appearance (Light/Dark mode)
void PathTransformSave()
Save the current affine transform of the current path.
virtual void FillArc(const IColor &color, float cx, float cy, float r, float a1, float a2, const IBlend *pBlend=0)
Fill an arc segment with a color.
-IPopupMenu & GetPromptMenu()
-void SetKeyHandlerFunc(IKeyHandlerFunc func)
Set a function that is called when key presses are not intercepted by any controls.
+IPopupMenu & GetPromptMenu()
+void SetKeyHandlerFunc(IKeyHandlerFunc func)
Set a function that is called when key presses are not intercepted by any controls.
virtual void DrawDottedLine(const IColor &color, float x1, float y1, float x2, float y2, const IBlend *pBlend=0, float thickness=1.f, float dashLen=2.f)
Draw a dotted line to the graphics context.
virtual bool WindowIsOpen()
void RemoveTextEntryControl()
Remove the IGraphics text entry, use platform text entry if available.
void ShowFPSDisplay(bool enable)
Shows a control to display the frame rate of drawing.
virtual void PathLineTo(float x, float y)=0
Add a line to the current path from the current point to the specified location.
void DrawLineAcross(const IColor &color, const IRECT &bounds, EDirection dir, float pos, const IBlend *pBlend=0, float thickness=1.f)
Draw a horzional or vertical line, within a rectangular region of the graphics context.
-int GetControlIdx(IControl *pControl) const
Get the index of a particular IControl in the control stack.
-const char * GetSharedResourcesSubPath() const
Gets the name of the shared resources subpath.
-IPopupMenuControl * GetPopupMenuControl()
-bool CanEnableMouseOver() const
+int GetControlIdx(IControl *pControl) const
Get the index of a particular IControl in the control stack.
+const char * GetSharedResourcesSubPath() const
Gets the name of the shared resources subpath.
+IPopupMenuControl * GetPopupMenuControl()
+bool CanEnableMouseOver() const
void PathTransformSkew(float xAngle, float yAngle)
Apply a skew transform to the current path.
-float GetDrawScale() const
Gets the graphics context scaling factor.
+float GetDrawScale() const
Gets the graphics context scaling factor.
void DrawFittedLayer(const ILayerPtr &layer, const IRECT &bounds, const IBlend *pBlend)
Draw a layer to the main IGraphics context, fitting it to a rectangle that is different to the layer'...
void RemoveControls(int fromIdx)
Remove controls from the control list above a particular index, (frees memory).
void AttachBackground(const char *fileName)
Attach an IBitmapControl as the lowest IControl in the control stack to be the background for the gra...
void SetStrictDrawing(bool strict)
Enables strict drawing mode.
-
+
virtual void ForceEndUserEdit()=0
Call to force end text entry (will cancel any half input text.
void OnGUIIdle()
This is an idle timer tick call on the GUI thread, only active if USE_IDLE_CALLS is defined.
virtual EMsgBoxResult ShowMessageBox(const char *str, const char *caption, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler=nullptr)=0
Pop up a modal platform message box dialog.
-IGEditorDelegate * GetDelegate()
Gets a pointer to the delegate class that handles communication to and from this graphics context.
-void ShowAreaDrawn(bool enable)
-IControl * GetControl(int idx)
Get the control at a certain index in the control stack.
+IGEditorDelegate * GetDelegate()
Gets a pointer to the delegate class that handles communication to and from this graphics context.
+void ShowAreaDrawn(bool enable)
+IControl * GetControl(int idx)
Get the control at a certain index in the control stack.
void StartLayer(IControl *pOwner, const IRECT &r, bool cacheable=false)
Create an IGraphics layer.
-int GetControlTag(const IControl *pControl) const
Get the tag given to a control.
+int GetControlTag(const IControl *pControl) const
Get the tag given to a control.
void OnGestureRecognized(const IGestureInfo &info)
Called by platform class when a gesture is recognized.
virtual void CachePlatformFont(const char *fontID, const PlatformFontPtr &font)=0
Called to indicate that the platform should cache data about the platform font if needed.
bool OnMouseDblClick(float x, float y, const IMouseMod &mod)
-bool TooltipsEnabled() const
+bool TooltipsEnabled() const
virtual void DrawSVG(const ISVG &svg, const IRECT &bounds, const IBlend *pBlend=0, const IColor *pStrokeColor=nullptr, const IColor *pFillColor=nullptr)
Draw an SVG image to the graphics context.
void ForStandardControlsFunc(IControlFunction func)
For all standard controls in the main control stack perform a function.
virtual void DrawTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0, float thickness=1.f)
Draw a triangle to the graphics context.
virtual void CloseWindow()=0
Close the platform view for this graphics context.
virtual void PathCubicBezierTo(float c1x, float c1y, float c2x, float c2y, float x2, float y2)=0
Add a cubic bezier to the current path from the current point to the specified location.
-int WindowHeight() const
Gets the height of the graphics context including draw scaling.
+int WindowHeight() const
Gets the height of the graphics context including draw scaling.
void PathEllipse(const IRECT &bounds)
Add an ellipse to the current path, specifying the rectangular region.
virtual IBitmap LoadBitmap(const char *fileNameOrResID, int nStates=1, bool framesAreHorizontal=false, int targetScale=0)
Load a bitmap image from disk or from windows resource.
-void SetPlatformContext(void *pContext)
Set the platform draw context Used in order to set the platform level draw context - CGContextRef con...
+void SetPlatformContext(void *pContext)
Set the platform draw context Used in order to set the platform level draw context - CGContextRef con...
virtual void BeginFrame()
Called at the beginning of drawing.
virtual void FillCircle(const IColor &color, float cx, float cy, float r, const IBlend *pBlend=0)
Fill a circle with a color.
-void OnSetCursor()
Called when the mouse enters the graphics context, to update the cursor to mCursorType.
+void OnSetCursor()
Called when the mouse enters the graphics context, to update the cursor to mCursorType.
void SetControlPosition(IControl *pControl, float x, float y)
Reposition a control, redrawing the interface correctly.
void SetScreenScale(float scale)
Called by the platform IGraphics class when moving to a new screen to set DPI.
-void EnableMouseOver(bool enable)
+void EnableMouseOver(bool enable)
virtual APIBitmap * LoadAPIBitmap(const char *name, const void *pData, int dataSize, int scale)=0
Drawing API method to load a bitmap from binary data, called internally.
ILayerPtr EndLayer()
End an IGraphics layer.
virtual WDL_TypedBuf< uint8_t > LoadResource(const char *fileNameOrResID, const char *fileType)
Load a resource from the file system, the bundle, or a Windows resource, and returns its data.
void OnDrop(const char *str, float x, float y)
-IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
+IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
IControl * AttachControl(IControl *pControl, int ctrlTag=kNoTag, const char *group="")
Attach an IControl to the graphics context and add it to the top of the control stack.
virtual void DrawBitmap(const IBitmap &bitmap, const IRECT &bounds, int srcX, int srcY, const IBlend *pBlend=0)=0
Draw a bitmap (raster) image to the graphics context.
virtual float MeasureText(const IText &text, const char *str, IRECT &bounds) const
Measure the rectangular region that some text will occupy.
diff --git a/_i_graphics_canvas_8cpp_source.html b/_i_graphics_canvas_8cpp_source.html
index 3ac21c11..20685096 100644
--- a/_i_graphics_canvas_8cpp_source.html
+++ b/_i_graphics_canvas_8cpp_source.html
@@ -698,7 +698,7 @@
void DrawBitmap(const IBitmap &bitmap, const IRECT &bounds, int srcX, int srcY, const IBlend *pBlend) override
Draw a bitmap (raster) image to the graphics context.
The lowest level base class of an IGraphics context.
void PathRect(const IRECT &bounds)
Add a rectangle to the current path.
-virtual float GetBackingPixelScale() const
+virtual float GetBackingPixelScale() const
void DoMeasureTextRotation(const IText &text, const IRECT &bounds, IRECT &rect) const
void PathTransformRestore()
Restore the affine transform of the current path, to the previously saved state.
void PathTransformSave()
Save the current affine transform of the current path.
diff --git a/_i_graphics_i_o_s__view_8h_source.html b/_i_graphics_i_o_s__view_8h_source.html
index 23c38bef..db3153be 100644
--- a/_i_graphics_i_o_s__view_8h_source.html
+++ b/_i_graphics_i_o_s__view_8h_source.html
@@ -203,7 +203,7 @@
The lowest level base class of an IGraphics context.
-float GetDrawScale() const
Gets the graphics context scaling factor.
+float GetDrawScale() const
Gets the graphics context scaling factor.
IGraphics platform class for IOS.
Used to manage color data, independent of draw class/platform.
diff --git a/_i_graphics_live_edit_8h_source.html b/_i_graphics_live_edit_8h_source.html
index e976ba88..951c71dc 100644
--- a/_i_graphics_live_edit_8h_source.html
+++ b/_i_graphics_live_edit_8h_source.html
@@ -432,18 +432,18 @@
virtual ECursor SetMouseCursor(ECursor cursorType=ECursor::ARROW)
Sets the mouse cursor to one of ECursor (implementations should return the result of the base impleme...
virtual void DrawDottedRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f, float dashLen=2.f)
Draw a dotted rectangle to the graphics context.
void ReleaseMouseCapture()
Used to tell the graphics context to stop tracking mouse interaction with a control.
-void GetMouseDownPoint(float &x, float &y) const
Get the x, y position of the last mouse down message.
-
+void GetMouseDownPoint(float &x, float &y) const
Get the x, y position of the last mouse down message.
+
virtual void FillTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0)
Fill a triangle with a color.
virtual void DrawGrid(const IColor &color, const IRECT &bounds, float gridSizeH, float gridSizeV, const IBlend *pBlend=0, float thickness=1.f)
Draw a grid to the graphics context.
void SetAllControlsDirty()
Calls SetDirty() on every control.
void SetControlSize(IControl *pControl, float w, float h)
Resize a control, redrawing the interface correctly.
-IControl * GetControl(int idx)
Get the control at a certain index in the control stack.
+IControl * GetControl(int idx)
Get the control at a certain index in the control stack.
void ForStandardControlsFunc(IControlFunction func)
For all standard controls in the main control stack perform a function.
virtual void DrawTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0, float thickness=1.f)
Draw a triangle to the graphics context.
void SetControlPosition(IControl *pControl, float x, float y)
Reposition a control, redrawing the interface correctly.
-void EnableMouseOver(bool enable)
-IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
+void EnableMouseOver(bool enable)
+IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
IControl * AttachControl(IControl *pControl, int ctrlTag=kNoTag, const char *group="")
Attach an IControl to the graphics context and add it to the top of the control stack.
A control to enable live modification of control layout in an IGraphics context in debug builds This ...
void OnResize() override
Called when IControl is constructed or resized using SetRect().
diff --git a/_i_graphics_mac_8h_source.html b/_i_graphics_mac_8h_source.html
index e538837e..088249f8 100644
--- a/_i_graphics_mac_8h_source.html
+++ b/_i_graphics_mac_8h_source.html
@@ -154,33 +154,35 @@
69 bool SetTextInClipboard(
const char * str)
override ;
70 bool SetFilePathInClipboard(
const char * path)
override ;
- 72 float MeasureText(
const IText & text,
const char * str,
IRECT & bounds)
const override ;
+ 72 bool InitiateExternalFileDragDrop(
const char * path,
const IRECT & iconBounds)
override API_AVAILABLE(macos(10.13));
- 74 EUIAppearance GetUIAppearance()
const override ;
-
-
-
- 78 void CreatePlatformTextEntry(
int paramIdx,
const IText & text,
const IRECT & bounds,
int length,
const char * str)
override ;
-
- 80 void PointToScreen(
float & x,
float & y)
const ;
- 81 void ScreenToPoint(
float & x,
float & y)
const ;
-
- 83 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fileNameOrResID)
override ;
- 84 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fontName, ETextStyle style)
override ;
- 85 PlatformFontPtr LoadPlatformFont(
const char * fontID,
void * pData,
int dataSize)
override ;
- 86 void CachePlatformFont(
const char * fontID,
const PlatformFontPtr& font)
override ;
-
- 88 void RepositionCursor(CGPoint point);
- 89 void StoreCursorPosition();
-
- 91 void * mView =
nullptr ;
- 92 CGPoint mCursorLockPosition;
- 93 WDL_String mBundleID, mAppGroupID;
-
-
-
- 97 END_IGRAPHICS_NAMESPACE
-
+ 74 float MeasureText(
const IText & text,
const char * str,
IRECT & bounds)
const override ;
+
+ 76 EUIAppearance GetUIAppearance()
const override ;
+
+
+
+ 80 void CreatePlatformTextEntry(
int paramIdx,
const IText & text,
const IRECT & bounds,
int length,
const char * str)
override ;
+
+ 82 void PointToScreen(
float & x,
float & y)
const ;
+ 83 void ScreenToPoint(
float & x,
float & y)
const ;
+
+ 85 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fileNameOrResID)
override ;
+ 86 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fontName, ETextStyle style)
override ;
+ 87 PlatformFontPtr LoadPlatformFont(
const char * fontID,
void * pData,
int dataSize)
override ;
+ 88 void CachePlatformFont(
const char * fontID,
const PlatformFontPtr& font)
override ;
+
+ 90 void RepositionCursor(CGPoint point);
+ 91 void StoreCursorPosition();
+
+ 93 void * mView =
nullptr ;
+ 94 CGPoint mCursorLockPosition;
+ 95 WDL_String mBundleID, mAppGroupID;
+
+
+
+ 99 END_IGRAPHICS_NAMESPACE
+
Used for choosing a drawing backend.
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
IGraphics platform class for macOS.
diff --git a/_i_graphics_mac_8mm_source.html b/_i_graphics_mac_8mm_source.html
index b8508ed3..992725d8 100644
--- a/_i_graphics_mac_8mm_source.html
+++ b/_i_graphics_mac_8mm_source.html
@@ -749,27 +749,49 @@
662 return (
bool )success;
- 665 EUIAppearance IGraphicsMac::GetUIAppearance()
const
-
- 667 if (@available(macOS 10.14, *)) {
-
-
- 670 IGRAPHICS_VIEW* pView = (IGRAPHICS_VIEW*) mView;
- 671 BOOL isDarkMode = [[[pView effectiveAppearance] name] isEqualToString: (NSAppearanceNameDarkAqua)];
- 672 return isDarkMode ? EUIAppearance::Dark : EUIAppearance::Light;
-
-
-
- 676 return EUIAppearance::Light;
-
-
- 679 #if defined IGRAPHICS_NANOVG
- 680 #include "IGraphicsNanoVG.cpp"
- 681 #elif defined IGRAPHICS_SKIA
- 682 #include "IGraphicsSkia.cpp"
-
- 684 #error Either NO_IGRAPHICS or one and only one choice of graphics library must be defined!
-
+ 665 bool IGraphicsMac::InitiateExternalFileDragDrop(
const char * path,
const IRECT & iconBounds)
+
+ 667 NSPasteboardItem* pasteboardItem = [[NSPasteboardItem alloc] init];
+ 668 NSURL* fileURL = [NSURL fileURLWithPath: [NSString stringWithUTF8String: path]];
+ 669 [pasteboardItem setString:fileURL.absoluteString forType:NSPasteboardTypeFileURL];
+
+ 671 NSDraggingItem* draggingItem = [[NSDraggingItem alloc] initWithPasteboardWriter:pasteboardItem];
+ 672 NSRect draggingFrame = ToNSRect(
this , iconBounds);
+ 673 NSImage* iconImage = [[NSWorkspace sharedWorkspace] iconForFile:fileURL.path];
+ 674 [iconImage setSize:NSMakeSize(64, 64)];
+ 675 [draggingItem setDraggingFrame:draggingFrame contents: iconImage];
+
+ 677 IGRAPHICS_VIEW* view = (IGRAPHICS_VIEW*) mView;
+ 678 NSDraggingSession* draggingSession = [view beginDraggingSessionWithItems:@[draggingItem] event:[NSApp currentEvent] source: view];
+ 679 draggingSession.animatesToStartingPositionsOnCancelOrFail = YES;
+ 680 draggingSession.draggingFormation = NSDraggingFormationNone;
+
+ 682 ReleaseMouseCapture();
+
+
+
+
+ 687 EUIAppearance IGraphicsMac::GetUIAppearance()
const
+
+ 689 if (@available(macOS 10.14, *)) {
+
+
+ 692 IGRAPHICS_VIEW* pView = (IGRAPHICS_VIEW*) mView;
+ 693 BOOL isDarkMode = [[[pView effectiveAppearance] name] isEqualToString: (NSAppearanceNameDarkAqua)];
+ 694 return isDarkMode ? EUIAppearance::Dark : EUIAppearance::Light;
+
+
+
+ 698 return EUIAppearance::Light;
+
+
+ 701 #if defined IGRAPHICS_NANOVG
+ 702 #include "IGraphicsNanoVG.cpp"
+ 703 #elif defined IGRAPHICS_SKIA
+ 704 #include "IGraphicsSkia.cpp"
+
+ 706 #error Either NO_IGRAPHICS or one and only one choice of graphics library must be defined!
+
This file contains the base IControl implementation, along with some base classes for specific types ...
The lowest level base class of an IGraphics control.
diff --git a/_i_graphics_mac__view_8h_source.html b/_i_graphics_mac__view_8h_source.html
index cdb57ec0..32ba36a8 100644
--- a/_i_graphics_mac__view_8h_source.html
+++ b/_i_graphics_mac__view_8h_source.html
@@ -200,7 +200,7 @@
113 #define VIEW_BASE NSView
- 116 @interface IGRAPHICS_VIEW : VIEW_BASE <NSTextFieldDelegate>
+ 116 @interface IGRAPHICS_VIEW : VIEW_BASE <NSTextFieldDelegate, NSDraggingSource>
118 CVDisplayLinkRef mDisplayLink;
119 dispatch_source_t mDisplaySource;
@@ -261,12 +261,13 @@
175 - (NSDragOperation) draggingEntered: (
id <NSDraggingInfo>) sender;
176 - (BOOL) performDragOperation: (
id <NSDraggingInfo>) sender;
-
- 178 - (void) setMouseCursor: (ECursor) cursorType;
-
-
+ 177 - (NSDragOperation)draggingSession:(NSDraggingSession*) session sourceOperationMaskForDraggingContext:(NSDraggingContext)context;
+
+ 179 - (void) setMouseCursor: (ECursor) cursorType;
+
+
The lowest level base class of an IGraphics context.
-float GetDrawScale() const
Gets the graphics context scaling factor.
+float GetDrawScale() const
Gets the graphics context scaling factor.
IGraphics platform class for macOS.
Used to manage a list of rectangular areas and optimize them for drawing to the screen.
diff --git a/_i_graphics_mac__view_8mm_source.html b/_i_graphics_mac__view_8mm_source.html
index 36122d3d..86834417 100644
--- a/_i_graphics_mac__view_8mm_source.html
+++ b/_i_graphics_mac__view_8mm_source.html
@@ -1372,54 +1372,59 @@
- 1288 #ifdef IGRAPHICS_METAL
- 1289 - (void) frameDidChange:(NSNotification*) pNotification
-
- 1291 CGFloat scale = [[
self window] backingScaleFactor];
+ 1288 - (NSDragOperation)draggingSession:(NSDraggingSession*) session sourceOperationMaskForDraggingContext:(NSDraggingContext)context
+
+ 1290 return NSDragOperationCopy;
+
- 1293 [(CAMetalLayer*)[
self layer] setDrawableSize:CGSizeMake(self.frame.size.width * scale,
- 1294 self.frame.size.height * scale)];
-
-
+ 1293 #ifdef IGRAPHICS_METAL
+ 1294 - (void) frameDidChange:(NSNotification*) pNotification
+
+ 1296 CGFloat scale = [[
self window] backingScaleFactor];
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ 1298 [(CAMetalLayer*)[
self layer] setDrawableSize:CGSizeMake(self.frame.size.width * scale,
+ 1299 self.frame.size.height * scale)];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This file contains the base IControl implementation, along with some base classes for specific types ...
IPlug logging a.k.a tracing functionality.
diff --git a/_i_graphics_nano_v_g_8cpp_source.html b/_i_graphics_nano_v_g_8cpp_source.html
index 0e38cfd4..96ece81a 100644
--- a/_i_graphics_nano_v_g_8cpp_source.html
+++ b/_i_graphics_nano_v_g_8cpp_source.html
@@ -1096,19 +1096,19 @@
ILayer * PopLayer()
Pop a layer off the stack.
void PathTransformTranslate(float x, float y)
Apply a translation transform to the current path.
void PathRect(const IRECT &bounds)
Add a rectangle to the current path.
-virtual float GetBackingPixelScale() const
+virtual float GetBackingPixelScale() const
void DoMeasureTextRotation(const IText &text, const IRECT &bounds, IRECT &rect) const
-int WindowWidth() const
Gets the width of the graphics context including draw scaling.
+int WindowWidth() const
Gets the width of the graphics context including draw scaling.
EResourceLocation SearchImageResource(const char *fileName, const char *type, WDL_String &result, int targetScale, int &sourceScale)
Search for a bitmap image resource matching the target scale.
void PathTransformRestore()
Restore the affine transform of the current path, to the previously saved state.
void PushLayer(ILayer *pLayer)
Push a layer on to the stack.
-int GetRoundedScreenScale() const
Gets the screen/display scaling factor, rounded up.
+int GetRoundedScreenScale() const
Gets the screen/display scaling factor, rounded up.
void RemoveAllControls()
Removes all regular IControls from the control list, as well as special controls (frees memory).
-virtual void * GetWinModuleHandle()
-float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
+virtual void * GetWinModuleHandle()
+float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
void PathTransformSave()
Save the current affine transform of the current path.
-float GetDrawScale() const
Gets the graphics context scaling factor.
-int WindowHeight() const
Gets the height of the graphics context including draw scaling.
+float GetDrawScale() const
Gets the graphics context scaling factor.
+int WindowHeight() const
Gets the height of the graphics context including draw scaling.
virtual void BeginFrame()
Called at the beginning of drawing.
IGraphics draw class using NanoVG
diff --git a/_i_graphics_skia_8cpp_source.html b/_i_graphics_skia_8cpp_source.html
index 17837dc7..ae935a3d 100644
--- a/_i_graphics_skia_8cpp_source.html
+++ b/_i_graphics_skia_8cpp_source.html
@@ -1066,23 +1066,23 @@
virtual void DrawRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f)
Draw a rectangle to the graphics context.
virtual void FillEllipse(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill an ellipse within a rectangular region of the graphics context.
virtual void DrawEllipse(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f)
Draw an ellipse within a rectangular region of the graphics context.
-float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
+float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
virtual void * GetWindow()=0
Get a pointer to the platform view e.g.
virtual void DrawRoundRect(const IColor &color, const IRECT &bounds, float cornerRadius=5.f, const IBlend *pBlend=0, float thickness=1.f)
Draw a rounded rectangle to the graphics context.
void DoMeasureTextRotation(const IText &text, const IRECT &bounds, IRECT &rect) const
-int WindowWidth() const
Gets the width of the graphics context including draw scaling.
+int WindowWidth() const
Gets the width of the graphics context including draw scaling.
void PathTransformRestore()
Restore the affine transform of the current path, to the previously saved state.
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
-void * GetPlatformContext()
Get the platform level draw context - an HDC or CGContextRef.
+void * GetPlatformContext()
Get the platform level draw context - an HDC or CGContextRef.
virtual void DrawArc(const IColor &color, float cx, float cy, float r, float a1, float a2, const IBlend *pBlend=0, float thickness=1.f)
Draw an arc to the graphics context.
void RemoveAllControls()
Removes all regular IControls from the control list, as well as special controls (frees memory).
virtual void DrawCircle(const IColor &color, float cx, float cy, float r, const IBlend *pBlend=0, float thickness=1.f)
Draw a circle to the graphics context.
virtual void FillRoundRect(const IColor &color, const IRECT &bounds, float cornerRadius=5.f, const IBlend *pBlend=0)
Fill a rounded rectangle with a color.
-virtual void * GetWinModuleHandle()
-float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
+virtual void * GetWinModuleHandle()
+float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
void PathTransformSave()
Save the current affine transform of the current path.
virtual void FillArc(const IColor &color, float cx, float cy, float r, float a1, float a2, const IBlend *pBlend=0)
Fill an arc segment with a color.
-int WindowHeight() const
Gets the height of the graphics context including draw scaling.
+int WindowHeight() const
Gets the height of the graphics context including draw scaling.
virtual void BeginFrame()
Called at the beginning of drawing.
virtual void FillCircle(const IColor &color, float cx, float cy, float r, const IBlend *pBlend=0)
Fill a circle with a color.
diff --git a/_i_graphics_web_8cpp_source.html b/_i_graphics_web_8cpp_source.html
index 69758920..742ac8ff 100644
--- a/_i_graphics_web_8cpp_source.html
+++ b/_i_graphics_web_8cpp_source.html
@@ -1021,7 +1021,7 @@
void OnTouchCancelled(const std::vector< IMouseInfo > &points)
Called when the platform class sends touch cancel events.
void OnMouseDown(const std::vector< IMouseInfo > &points)
Called when the platform class sends mouse down events.
void OnMouseWheel(float x, float y, const IMouseMod &mod, float delta)
-float GetDrawScale() const
Gets the graphics context scaling factor.
+float GetDrawScale() const
Gets the graphics context scaling factor.
IGraphics platform class for the web.
diff --git a/_i_graphics_win_8cpp_source.html b/_i_graphics_win_8cpp_source.html
index a044214b..a6af13f3 100644
--- a/_i_graphics_win_8cpp_source.html
+++ b/_i_graphics_win_8cpp_source.html
@@ -103,2306 +103,2333 @@
18 #include "IGraphicsWin.h"
-
-
-
-
- 23 #include <VersionHelpers.h>
-
-
-
- 27 #define CCSIZEOF_STRUCT(structname, member) (__builtin_offsetof(structname, member) + sizeof(((structname*)0)->member))
-
-
-
- 31 using namespace igraphics;
-
- 33 #pragma warning(disable:4244)
- 34 #pragma warning(disable:4312)
- 35 #pragma warning(disable:4311)
-
- 37 static int nWndClassReg = 0;
- 38 static wchar_t * wndClassName = L
"IPlugWndClass" ;
- 39 static double sFPS = 0.0;
-
- 41 #define PARAM_EDIT_ID 99
- 42 #define IPLUG_TIMER_ID 2
-
- 44 #define TOOLTIPWND_MAXWIDTH 250
-
- 46 #define WM_VBLANK (WM_USER+1)
-
-
- 49 typedef HGLRC(WINAPI* PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext,
const int * attribList);
- 50 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
- 51 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
- 52 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
- 53 #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
-
-
- 56 #pragma mark - Private Classes and Structs
-
-
-
-
-
-
-
- 64 : mFontHandle(
nullptr )
-
-
-
-
- 69 mFontHandle = AddFontMemResourceEx(data, resSize, NULL, &numFonts);
-
-
-
-
-
-
- 76 RemoveFontMemResourceEx(mFontHandle);
-
-
-
-
-
- 82 bool IsValid()
const {
return mFontHandle; }
-
-
-
-
-
-
-
-
-
- 92 LOGFONTW lFont = { 0 };
- 93 GetObjectW(hfont,
sizeof (LOGFONTW), &lFont);
- 94 mHFont = CreateFontIndirectW(&lFont);
-
-
-
-
-
- 100 class IGraphicsWin::Font :
public PlatformFont
-
-
- 103 Font(HFONT font,
const char * styleName,
bool system)
- 104 : PlatformFont(system), mFont(font), mStyleName(styleName) {}
-
-
-
-
-
- 110 FontDescriptor GetDescriptor()
override {
return mFont; }
- 111 IFontDataPtr GetFontData()
override ;
-
-
-
- 115 WDL_String mStyleName;
-
-
- 118 IFontDataPtr IGraphicsWin::Font::GetFontData()
-
- 120 HDC hdc = CreateCompatibleDC(NULL);
- 121 IFontDataPtr fontData(
new IFontData());
-
-
-
- 125 SelectObject(hdc, mFont);
- 126 const size_t size = ::GetFontData(hdc, 0, 0, NULL, 0);
-
- 128 if (size != GDI_ERROR)
-
- 130 fontData = std::make_unique<IFontData>(size);
-
- 132 if (fontData->GetSize() == size)
-
- 134 size_t result = ::GetFontData(hdc, 0x66637474, 0, fontData->Get(), size);
- 135 if (result == GDI_ERROR)
- 136 result = ::GetFontData(hdc, 0, 0, fontData->Get(), size);
-
- 138 fontData->SetFaceIdx(GetFaceIdx(fontData->Get(), fontData->GetSize(), mStyleName.Get()));
-
-
-
-
-
-
-
-
-
- 148 StaticStorage<IGraphicsWin::InstalledFont> IGraphicsWin::sPlatformFontCache;
- 149 StaticStorage<IGraphicsWin::HFontHolder> IGraphicsWin::sHFontCache;
-
- 151 #pragma mark - Mouse and tablet helpers
-
- 153 extern float GetScaleForHWND(HWND hWnd);
-
- 155 inline IMouseInfo IGraphicsWin::GetMouseInfo(LPARAM lParam, WPARAM wParam)
-
-
- 158 const float scale = GetTotalScale();
- 159 info.x = mCursorX = GET_X_LPARAM(lParam) / scale;
- 160 info.y = mCursorY = GET_Y_LPARAM(lParam) / scale;
- 161 info.ms =
IMouseMod ((wParam & MK_LBUTTON), (wParam & MK_RBUTTON), (wParam & MK_SHIFT), (wParam & MK_CONTROL),
-
- 163 GetAsyncKeyState(VK_MENU) < 0
-
- 165 GetKeyState(VK_MENU) < 0
-
-
-
-
-
-
- 172 void IGraphicsWin::CheckTabletInput(UINT msg)
-
- 174 if ((msg == WM_LBUTTONDOWN) || (msg == WM_RBUTTONDOWN) || (msg == WM_MBUTTONDOWN) || (msg == WM_MOUSEMOVE)
- 175 || (msg == WM_RBUTTONDBLCLK) || (msg == WM_LBUTTONDBLCLK) || (msg == WM_MBUTTONDBLCLK)
- 176 || (msg == WM_RBUTTONUP) || (msg == WM_LBUTTONUP) || (msg == WM_MBUTTONUP)
- 177 || (msg == WM_MOUSEHOVER) || (msg == WM_MOUSELEAVE))
-
- 179 const LONG_PTR c_SIGNATURE_MASK = 0xFFFFFF00;
- 180 const LONG_PTR c_MOUSEEVENTF_FROMTOUCH = 0xFF515700;
-
- 182 LONG_PTR extraInfo = GetMessageExtraInfo();
- 183 SetTabletInput(((extraInfo & c_SIGNATURE_MASK) == c_MOUSEEVENTF_FROMTOUCH));
- 184 mCursorLock &= !mTabletInput;
-
-
-
- 188 void IGraphicsWin::DestroyEditWindow()
-
-
-
- 192 SetWindowLongPtrW(mParamEditWnd, GWLP_WNDPROC, (LPARAM) mDefEditProc);
- 193 DestroyWindow(mParamEditWnd);
- 194 mParamEditWnd =
nullptr ;
- 195 mDefEditProc =
nullptr ;
- 196 DeleteObject(mEditFont);
-
-
-
-
- 201 void IGraphicsWin::OnDisplayTimer(
int vBlankCount)
-
-
- 204 DWORD msgCount = vBlankCount;
- 205 DWORD curCount = mVBlankCount;
-
-
-
-
- 210 if (mVBlankSkipUntil != 0 && mVBlankSkipUntil > mVBlankCount)
-
-
-
-
- 215 mVBlankSkipUntil = 0;
-
- 217 if (msgCount != curCount)
-
-
-
-
-
-
-
- 225 if (mParamEditWnd && mParamEditMsg != kNone)
-
- 227 switch (mParamEditMsg)
-
-
-
- 231 WCHAR strWide[MAX_WIN32_PARAM_LEN];
- 232 SendMessageW(mParamEditWnd, WM_GETTEXT, MAX_WIN32_PARAM_LEN, (LPARAM) strWide);
- 233 SetControlValueAfterTextEdit(UTF16AsUTF8(strWide).Get());
-
-
-
-
-
- 239 ClearInTextEntryControl();
-
-
-
- 243 mParamEditMsg = kNone;
-
-
-
-
-
-
-
- 251 float scale = GetScaleForHWND(mPlugWnd);
- 252 if (scale != GetScreenScale())
- 253 SetScreenScale(scale);
-
-
-
-
-
- 259 const float totalScale = GetTotalScale();
-
-
- 262 SetAllControlsClean();
-
- 264 for (
int i = 0; i < rects.
Size (); i++)
-
-
- 267 dirtyR.
Scale (totalScale);
-
- 269 RECT r = { (LONG)dirtyR.L, (LONG)dirtyR.T, (LONG)dirtyR.R, (LONG)dirtyR.B };
- 270 InvalidateRect(mPlugWnd, &r, FALSE);
-
-
-
-
- 275 IRECT notDirtyR = mEditRECT;
- 276 notDirtyR.
Scale (totalScale);
-
- 278 RECT r2 = { (LONG)notDirtyR.L, (LONG)notDirtyR.T, (LONG)notDirtyR.R, (LONG)notDirtyR.B };
- 279 ValidateRect(mPlugWnd, &r2);
- 280 UpdateWindow(mPlugWnd);
- 281 mParamEditMsg = kUpdate;
-
-
-
-
- 286 UpdateWindow(mPlugWnd);
-
-
-
-
- 291 curCount = mVBlankCount;
- 292 if (msgCount != curCount)
-
-
- 295 mVBlankSkipUntil = curCount+1;
-
-
-
-
-
-
-
-
-
- 305 LRESULT CALLBACK IGraphicsWin::WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-
- 307 if (msg == WM_CREATE)
-
- 309 CREATESTRUCTW* lpcs = (CREATESTRUCTW *) lParam;
- 310 SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LPARAM) lpcs->lpCreateParams);
-
-
- 313 if (pGraphics->mVSYNCEnabled)
-
- 315 assert((pGraphics->FPS() == 60) &&
"If you want to run at frame rates other than 60FPS" );
- 316 pGraphics->StartVBlankThread(hWnd);
-
-
-
- 320 int mSec =
static_cast< int > (std::floorf(1000.0f / (pGraphics->FPS())));
- 321 if (mSec < 20) mSec = 15;
- 322 SetTimer(hWnd, IPLUG_TIMER_ID, mSec, NULL);
-
-
-
- 326 DragAcceptFiles(hWnd,
true );
-
-
-
-
-
- 332 if (!pGraphics || hWnd != pGraphics->mPlugWnd)
-
- 334 return DefWindowProcW(hWnd, msg, wParam, lParam);
-
-
- 337 if (pGraphics->mParamEditWnd && pGraphics->mParamEditMsg == kEditing)
-
- 339 if (msg == WM_RBUTTONDOWN || (msg == WM_LBUTTONDOWN))
-
- 341 pGraphics->mParamEditMsg = kCancel;
-
-
- 344 return DefWindowProcW(hWnd, msg, wParam, lParam);
-
-
- 347 auto IsTouchEvent = []() {
- 348 const LONG_PTR c_SIGNATURE_MASK = 0xFFFFFF00;
- 349 const LONG_PTR c_MOUSEEVENTF_FROMTOUCH = 0xFF515700;
- 350 LONG_PTR extraInfo = GetMessageExtraInfo();
- 351 return ((extraInfo & c_SIGNATURE_MASK) == c_MOUSEEVENTF_FROMTOUCH);
-
-
- 354 pGraphics->CheckTabletInput(msg);
-
-
-
-
- 359 pGraphics->OnDisplayTimer(wParam);
-
-
-
- 363 if (wParam == IPLUG_TIMER_ID)
- 364 pGraphics->OnDisplayTimer(0);
-
-
-
-
-
-
-
-
-
-
-
-
-
- 378 pGraphics->HideTooltip();
- 379 if (pGraphics->mParamEditWnd)
-
- 381 pGraphics->mParamEditMsg = kCommit;
-
-
-
-
- 386 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
- 387 std::vector<IMouseInfo> list{ info };
- 388 pGraphics->OnMouseDown(list);
-
-
-
-
- 393 pGraphics->OnSetCursor();
-
-
-
-
-
-
-
- 401 if (!(wParam & (MK_LBUTTON | MK_RBUTTON)))
-
- 403 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
- 404 if (pGraphics->OnMouseOver(info.x, info.y, info.ms))
-
- 406 TRACKMOUSEEVENT eventTrack = {
sizeof (TRACKMOUSEEVENT), TME_LEAVE, hWnd, HOVER_DEFAULT };
- 407 if (pGraphics->TooltipsEnabled())
-
- 409 int c = pGraphics->GetMouseOver();
- 410 if (c != pGraphics->mTooltipIdx)
-
- 412 if (c >= 0) eventTrack.dwFlags |= TME_HOVER;
- 413 pGraphics->mTooltipIdx = c;
- 414 pGraphics->HideTooltip();
-
-
-
- 418 TrackMouseEvent(&eventTrack);
-
-
- 421 else if (GetCapture() == hWnd && !pGraphics->IsInPlatformTextEntry())
-
- 423 float oldX = pGraphics->mCursorX;
- 424 float oldY = pGraphics->mCursorY;
-
- 426 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
-
- 428 info.dX = info.x - oldX;
- 429 info.dY = info.y - oldY;
-
- 431 if (info.dX || info.dY)
-
- 433 std::vector<IMouseInfo> list{ info };
- 434 pGraphics->OnMouseDrag(list);
-
- 436 if (pGraphics->MouseCursorIsLocked())
-
- 438 const float x = pGraphics->mHiddenCursorX;
- 439 const float y = pGraphics->mHiddenCursorY;
-
- 441 pGraphics->MoveMouseCursor(x, y);
- 442 pGraphics->mHiddenCursorX = x;
- 443 pGraphics->mHiddenCursorY = y;
-
-
-
-
-
-
-
-
- 452 pGraphics->ShowTooltip();
-
-
-
-
- 457 pGraphics->HideTooltip();
- 458 pGraphics->OnMouseOut();
-
-
-
-
-
-
- 465 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
- 466 std::vector<IMouseInfo> list{ info };
- 467 pGraphics->OnMouseUp(list);
-
-
- 470 case WM_LBUTTONDBLCLK:
- 471 case WM_RBUTTONDBLCLK:
-
-
-
-
- 476 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
- 477 if (pGraphics->OnMouseDblClick(info.x, info.y, info.ms))
-
-
-
-
-
-
-
- 485 if (pGraphics->mParamEditWnd)
-
- 487 pGraphics->mParamEditMsg = kCancel;
-
-
-
-
- 492 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
- 493 float d = GET_WHEEL_DELTA_WPARAM(wParam) / WHEEL_DELTA;
- 494 const float scale = pGraphics->GetTotalScale();
-
- 496 GetWindowRect(hWnd, &r);
- 497 pGraphics->OnMouseWheel(info.x - (r.left / scale), info.y - (r.top / scale), info.ms, d);
-
-
-
-
-
- 503 UINT nTouches = LOWORD(wParam);
-
-
-
- 507 WDL_TypedBuf<TOUCHINPUT> touches;
- 508 touches.Resize(nTouches);
- 509 HTOUCHINPUT hTouchInput = (HTOUCHINPUT) lParam;
- 510 std::vector<IMouseInfo> downlist;
- 511 std::vector<IMouseInfo> uplist;
- 512 std::vector<IMouseInfo> movelist;
- 513 const float scale = pGraphics->GetTotalScale();
-
- 515 GetTouchInputInfo(hTouchInput, nTouches, touches.Get(),
sizeof (TOUCHINPUT));
-
- 517 for (
int i = 0; i < nTouches; i++)
-
- 519 TOUCHINPUT* pTI = touches.Get() +i;
-
-
- 522 pt.x = TOUCH_COORD_TO_PIXEL(pTI->x);
- 523 pt.y = TOUCH_COORD_TO_PIXEL(pTI->y);
- 524 ScreenToClient(pGraphics->mPlugWnd, &pt);
-
-
- 527 info.x =
static_cast< float > (pt.x) / scale;
- 528 info.y =
static_cast< float > (pt.y) / scale;
-
-
- 531 info.ms.touchRadius = 0;
-
- 533 if (pTI->dwMask & TOUCHINPUTMASKF_CONTACTAREA)
-
- 535 info.ms.touchRadius = pTI->cxContact;
-
-
- 538 info.ms.touchID =
static_cast< ITouchID
> (pTI->dwID);
-
- 540 if (pTI->dwFlags & TOUCHEVENTF_DOWN)
-
- 542 downlist.push_back(info);
- 543 pGraphics->mDeltaCapture.insert(std::make_pair(info.ms.touchID, info));
-
- 545 else if (pTI->dwFlags & TOUCHEVENTF_UP)
-
- 547 pGraphics->mDeltaCapture.erase(info.ms.touchID);
- 548 uplist.push_back(info);
-
- 550 else if (pTI->dwFlags & TOUCHEVENTF_MOVE)
-
- 552 IMouseInfo previous = pGraphics->mDeltaCapture.find(info.ms.touchID)->second;
- 553 info.dX = info.x - previous.x;
- 554 info.dY = info.y - previous.y;
- 555 movelist.push_back(info);
- 556 pGraphics->mDeltaCapture[info.ms.touchID] = info;
-
-
-
-
- 561 pGraphics->OnMouseDown(downlist);
-
-
- 564 pGraphics->OnMouseUp(uplist);
-
-
- 567 pGraphics->OnMouseDrag(movelist);
-
- 569 CloseTouchInputHandle(hTouchInput);
-
-
-
-
- 574 return DLGC_WANTALLKEYS;
-
-
-
-
-
- 580 ScreenToClient(hWnd, &p);
-
- 582 BYTE keyboardState[256] = {};
- 583 GetKeyboardState(keyboardState);
- 584 const int keyboardScanCode = (lParam >> 16) & 0x00ff;
-
- 586 const int len = ToAscii(wParam, keyboardScanCode, keyboardState, &character, 0);
-
-
-
-
- 591 if (len == 0 || len == 1)
-
-
- 594 str[0] =
static_cast< char > (character);
-
-
- 597 IKeyPress keyPress{ str,
static_cast< int > (wParam),
- 598 static_cast< bool > (GetKeyState(VK_SHIFT) & 0x8000),
- 599 static_cast< bool > (GetKeyState(VK_CONTROL) & 0x8000),
- 600 static_cast< bool > (GetKeyState(VK_MENU) & 0x8000) };
-
- 602 const float scale = pGraphics->GetTotalScale();
-
- 604 if (msg == WM_KEYDOWN)
- 605 handle = pGraphics->OnKeyDown(p.x / scale, p.y / scale, keyPress);
-
- 607 handle = pGraphics->OnKeyUp(p.x / scale, p.y / scale, keyPress);
-
-
-
-
- 612 HWND rootHWnd = GetAncestor( hWnd, GA_ROOT);
- 613 SendMessageW(rootHWnd, msg, wParam, lParam);
- 614 return DefWindowProcW(hWnd, msg, wParam, lParam);
-
-
-
-
-
-
- 621 const float scale = pGraphics->GetTotalScale();
- 622 auto addDrawRect = [pGraphics, scale](
IRECTList & rects, RECT r) {
- 623 IRECT ir(r.left, r.top, r.right, r.bottom);
-
-
-
-
-
- 629 HRGN region = CreateRectRgn(0, 0, 0, 0);
- 630 int regionType = GetUpdateRgn(hWnd, region, FALSE);
-
- 632 if ((regionType == COMPLEXREGION) || (regionType == SIMPLEREGION))
-
-
- 635 const int bufferSize =
sizeof (RECT) * 64;
- 636 unsigned char stackBuffer[
sizeof (RGNDATA) + bufferSize];
- 637 RGNDATA* regionData = (RGNDATA*)stackBuffer;
-
- 639 if (regionType == COMPLEXREGION && GetRegionData(region, bufferSize, regionData))
-
- 641 for (
int i = 0; i < regionData->rdh.nCount; i++)
- 642 addDrawRect(rects, *(((RECT*)regionData->Buffer) + i));
-
-
-
-
- 647 GetRgnBox(region, &r);
- 648 addDrawRect(rects, r);
-
-
- 651 #if defined IGRAPHICS_GL
-
- 653 BeginPaint(hWnd, &ps);
-
-
-
- 657 pGraphics->ActivateGLContext();
-
-
- 660 pGraphics->Draw(rects);
-
-
- 663 SwapBuffers((HDC) pGraphics->GetPlatformContext());
- 664 pGraphics->DeactivateGLContext();
-
-
- 667 #if defined IGRAPHICS_GL || IGRAPHICS_D2D
-
-
-
-
-
-
-
- 675 ValidateRect(hWnd, 0);
-
- 677 DeleteObject(region);
-
-
-
-
- 682 case WM_CTLCOLOREDIT:
-
- 684 if (!pGraphics->mParamEditWnd)
-
-
- 687 const IText & text = pGraphics->mEditText;
- 688 HDC dc = (HDC) wParam;
- 689 SetBkColor(dc, RGB(text.mTextEntryBGColor.R, text.mTextEntryBGColor.G, text.mTextEntryBGColor.B));
- 690 SetTextColor(dc, RGB(text.mTextEntryFGColor.R, text.mTextEntryFGColor.G, text.mTextEntryFGColor.B));
- 691 SetBkMode(dc, OPAQUE);
- 692 SetDCBrushColor(dc, RGB(text.mTextEntryBGColor.R, text.mTextEntryBGColor.G, text.mTextEntryBGColor.B));
- 693 return (LRESULT)GetStockObject(DC_BRUSH);
-
-
-
- 697 HDROP hdrop = (HDROP) wParam;
-
- 699 int numDroppedFiles = DragQueryFileW(hdrop, -1,
nullptr , 0);
-
- 701 std::vector<std::vector<char>> pathBuffers(numDroppedFiles, std::vector<char>(1025, 0));
- 702 std::vector<const char*> pathPtrs(numDroppedFiles);
-
- 704 for (
int i = 0; i < numDroppedFiles; i++)
-
- 706 wchar_t pathBufferW[1025] = {
'\0' };
- 707 DragQueryFileW(hdrop, i, pathBufferW, 1024);
- 708 strncpy(pathBuffers[i].data(), UTF16AsUTF8(pathBufferW).Get(), 1024);
- 709 pathPtrs[i] = pathBuffers[i].data();
-
-
- 712 DragQueryPoint(hdrop, &p);
-
- 714 const float scale = pGraphics->GetTotalScale();
-
- 716 if (numDroppedFiles==1)
-
- 718 pGraphics->OnDrop(&pathPtrs[0][0], p.x / scale, p.y / scale);
-
-
-
- 722 pGraphics->OnDropMultiple(pathPtrs, p.x / scale, p.y / scale);
-
-
-
-
-
-
- 729 pGraphics->CloseWindow();
-
-
-
-
-
-
-
-
-
-
-
- 741 return DefWindowProcW(hWnd, msg, wParam, lParam);
-
-
-
- 745 LRESULT CALLBACK IGraphicsWin::ParamEditProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-
-
-
- 749 if (pGraphics && pGraphics->mParamEditWnd && pGraphics->mParamEditWnd == hWnd)
-
- 751 pGraphics->HideTooltip();
-
-
-
-
-
-
- 758 if (pGraphics->mEditParam)
-
-
-
- 762 if (c == 0x08)
break ;
-
- 764 switch (pGraphics->mEditParam->
Type ())
-
- 766 case IParam::kTypeEnum:
- 767 case IParam::kTypeInt:
- 768 case IParam::kTypeBool:
- 769 if (c >=
'0' && c <=
'9' )
break ;
- 770 else if (c ==
'-' )
break ;
- 771 else if (c ==
'+' )
break ;
-
- 773 case IParam::kTypeDouble:
- 774 if (c >=
'0' && c <=
'9' )
break ;
- 775 else if (c ==
'-' )
break ;
- 776 else if (c ==
'+' )
break ;
- 777 else if (c ==
'.' )
break ;
-
-
-
-
-
-
-
-
-
- 787 if (wParam == VK_RETURN)
-
- 789 pGraphics->mParamEditMsg = kCommit;
-
-
- 792 else if (wParam == VK_ESCAPE)
-
- 794 pGraphics->mParamEditMsg = kCancel;
-
-
-
-
-
-
- 801 pGraphics->mParamEditMsg = kEditing;
-
-
-
-
- 806 pGraphics->mParamEditMsg = kCommit;
-
-
-
-
-
-
-
-
- 815 lres = CallWindowProcW(pGraphics->mDefEditProc, hWnd, WM_GETDLGCODE, wParam, lParam);
-
- 817 if (lParam && ((MSG*)lParam)->message == WM_KEYDOWN && wParam == VK_RETURN)
-
- 819 lres |= DLGC_WANTMESSAGE;
-
-
-
-
-
- 825 switch HIWORD(wParam)
-
-
-
- 829 if (pGraphics->mParamEditWnd)
-
- 831 pGraphics->mParamEditMsg = kCommit;
-
-
-
-
-
-
-
-
- 840 return CallWindowProcW(pGraphics->mDefEditProc, hWnd, msg, wParam, lParam);
-
- 842 return DefWindowProcW(hWnd, msg, wParam, lParam);
-
-
- 845 IGraphicsWin::IGraphicsWin(
IGEditorDelegate & dlg,
int w,
int h,
int fps,
float scale)
- 846 : IGRAPHICS_DRAW_CLASS(dlg, w, h, fps, scale)
-
- 848 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
- 849 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
- 850 fontStorage.Retain();
- 851 hfontStorage.Retain();
-
- 853 #ifndef IGRAPHICS_DISABLE_VSYNC
- 854 mVSYNCEnabled = IsWindows8OrGreater();
-
-
-
- 858 IGraphicsWin::~IGraphicsWin()
-
- 860 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
- 861 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
- 862 fontStorage.Release();
- 863 hfontStorage.Release();
-
-
-
-
- 868 static void GetWindowSize(HWND pWnd,
int * pW,
int * pH)
-
-
-
-
- 873 GetWindowRect(pWnd, &r);
- 874 *pW = r.right - r.left;
- 875 *pH = r.bottom - r.top;
-
-
-
-
-
-
-
- 883 static bool IsChildWindow(HWND pWnd)
-
-
-
- 887 int style = GetWindowLongW(pWnd, GWL_STYLE);
- 888 int exStyle = GetWindowLongW(pWnd, GWL_EXSTYLE);
- 889 return ((style & WS_CHILD) && !(exStyle & WS_EX_MDICHILD));
-
-
-
-
- 894 void IGraphicsWin::ForceEndUserEdit()
-
- 896 mParamEditMsg = kCancel;
-
-
- 899 static UINT SETPOS_FLAGS = SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE;
-
- 901 void IGraphicsWin::PlatformResize(
bool parentHasResized)
-
-
-
- 905 HWND pParent = 0, pGrandparent = 0;
- 906 int dlgW = 0, dlgH = 0, parentW = 0, parentH = 0, grandparentW = 0, grandparentH = 0;
- 907 GetWindowSize(mPlugWnd, &dlgW, &dlgH);
- 908 int dw = (WindowWidth() * GetScreenScale()) - dlgW, dh = (WindowHeight()* GetScreenScale()) - dlgH;
-
- 910 if (IsChildWindow(mPlugWnd))
-
- 912 pParent = GetParent(mPlugWnd);
- 913 GetWindowSize(pParent, &parentW, &parentH);
-
- 915 if (IsChildWindow(pParent))
-
- 917 pGrandparent = GetParent(pParent);
- 918 GetWindowSize(pGrandparent, &grandparentW, &grandparentH);
-
-
-
-
-
-
- 925 SetWindowPos(mPlugWnd, 0, 0, 0, dlgW + dw, dlgH + dh, SETPOS_FLAGS);
-
- 927 if (pParent && !parentHasResized)
-
- 929 SetWindowPos(pParent, 0, 0, 0, parentW + dw, parentH + dh, SETPOS_FLAGS);
-
-
- 932 if (pGrandparent && !parentHasResized)
-
- 934 SetWindowPos(pGrandparent, 0, 0, 0, grandparentW + dw, grandparentH + dh, SETPOS_FLAGS);
-
-
-
-
-
- 940 void IGraphicsWin::DrawResize()
-
-
- 943 IGRAPHICS_DRAW_CLASS::DrawResize();
- 944 DeactivateGLContext();
-
-
-
- 948 void IGraphicsWin::HideMouseCursor(
bool hide,
bool lock)
-
- 950 if (mCursorHidden == hide)
-
-
-
-
- 955 mHiddenCursorX = mCursorX;
- 956 mHiddenCursorY = mCursorY;
-
-
- 959 mCursorHidden =
true ;
- 960 mCursorLock = lock && !mTabletInput;
-
-
-
-
- 965 MoveMouseCursor(mHiddenCursorX, mHiddenCursorY);
-
-
- 968 mCursorHidden =
false ;
-
-
-
-
- 973 void IGraphicsWin::MoveMouseCursor(
float x,
float y)
-
-
-
-
- 978 const float scale = GetTotalScale();
-
-
- 981 p.x = std::round(x * scale);
- 982 p.y = std::round(y * scale);
-
- 984 ::ClientToScreen(mPlugWnd, &p);
-
- 986 if (SetCursorPos(p.x, p.y))
-
-
- 989 ScreenToClient(mPlugWnd, &p);
-
- 991 mHiddenCursorX = mCursorX = p.x / scale;
- 992 mHiddenCursorY = mCursorY = p.y / scale;
-
-
-
- 996 ECursor IGraphicsWin::SetMouseCursor(ECursor cursorType)
-
-
-
-
-
- 1002 case ECursor::ARROW: cursor = LoadCursor(NULL, IDC_ARROW);
break ;
- 1003 case ECursor::IBEAM: cursor = LoadCursor(NULL, IDC_IBEAM);
break ;
- 1004 case ECursor::WAIT: cursor = LoadCursor(NULL, IDC_WAIT);
break ;
- 1005 case ECursor::CROSS: cursor = LoadCursor(NULL, IDC_CROSS);
break ;
- 1006 case ECursor::UPARROW: cursor = LoadCursor(NULL, IDC_UPARROW);
break ;
- 1007 case ECursor::SIZENWSE: cursor = LoadCursor(NULL, IDC_SIZENWSE);
break ;
- 1008 case ECursor::SIZENESW: cursor = LoadCursor(NULL, IDC_SIZENESW);
break ;
- 1009 case ECursor::SIZEWE: cursor = LoadCursor(NULL, IDC_SIZEWE);
break ;
- 1010 case ECursor::SIZENS: cursor = LoadCursor(NULL, IDC_SIZENS);
break ;
- 1011 case ECursor::SIZEALL: cursor = LoadCursor(NULL, IDC_SIZEALL);
break ;
- 1012 case ECursor::INO: cursor = LoadCursor(NULL, IDC_NO);
break ;
- 1013 case ECursor::HAND: cursor = LoadCursor(NULL, IDC_HAND);
break ;
- 1014 case ECursor::APPSTARTING: cursor = LoadCursor(NULL, IDC_APPSTARTING);
break ;
- 1015 case ECursor::HELP: cursor = LoadCursor(NULL, IDC_HELP);
break ;
-
- 1017 cursor = LoadCursor(NULL, IDC_ARROW);
-
-
-
-
-
-
- 1024 bool IGraphicsWin::MouseCursorIsLocked()
-
-
-
-
- 1029 void IGraphicsWin::GetMouseLocation(
float & x,
float &y)
const
-
-
-
- 1033 ScreenToClient(mPlugWnd, &p);
-
- 1035 const float scale = GetTotalScale();
-
-
-
-
-
-
- 1042 void IGraphicsWin::CreateGLContext()
-
- 1044 PIXELFORMATDESCRIPTOR pfd =
-
- 1046 sizeof (PIXELFORMATDESCRIPTOR),
-
- 1048 PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,
-
-
-
-
+ 19 #include "IGraphicsWin_dnd.h"
+
+
+
+
+ 24 #include <VersionHelpers.h>
+
+
+
+ 28 #define CCSIZEOF_STRUCT(structname, member) (__builtin_offsetof(structname, member) + sizeof(((structname*)0)->member))
+
+
+
+ 32 using namespace igraphics;
+
+ 34 #pragma warning(disable:4244)
+ 35 #pragma warning(disable:4312)
+ 36 #pragma warning(disable:4311)
+
+ 38 static int nWndClassReg = 0;
+ 39 static wchar_t * wndClassName = L
"IPlugWndClass" ;
+ 40 static double sFPS = 0.0;
+
+ 42 #define PARAM_EDIT_ID 99
+ 43 #define IPLUG_TIMER_ID 2
+
+ 45 #define TOOLTIPWND_MAXWIDTH 250
+
+ 47 #define WM_VBLANK (WM_USER+1)
+
+
+ 50 typedef HGLRC(WINAPI* PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext,
const int * attribList);
+ 51 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
+ 52 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
+ 53 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
+ 54 #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+
+
+ 57 #pragma mark - Private Classes and Structs
+
+
+
+
+
+
+
+ 65 : mFontHandle(
nullptr )
+
+
+
+
+ 70 mFontHandle = AddFontMemResourceEx(data, resSize, NULL, &numFonts);
+
+
+
+
+
+
+ 77 RemoveFontMemResourceEx(mFontHandle);
+
+
+
+
+
+ 83 bool IsValid()
const {
return mFontHandle; }
+
+
+
+
+
+
+
+
+
+ 93 LOGFONTW lFont = { 0 };
+ 94 GetObjectW(hfont,
sizeof (LOGFONTW), &lFont);
+ 95 mHFont = CreateFontIndirectW(&lFont);
+
+
+
+
+
+ 101 class IGraphicsWin::Font :
public PlatformFont
+
+
+ 104 Font(HFONT font,
const char * styleName,
bool system)
+ 105 : PlatformFont(system), mFont(font), mStyleName(styleName) {}
+
+
+
+
+
+ 111 FontDescriptor GetDescriptor()
override {
return mFont; }
+ 112 IFontDataPtr GetFontData()
override ;
+
+
+
+ 116 WDL_String mStyleName;
+
+
+ 119 IFontDataPtr IGraphicsWin::Font::GetFontData()
+
+ 121 HDC hdc = CreateCompatibleDC(NULL);
+ 122 IFontDataPtr fontData(
new IFontData());
+
+
+
+ 126 SelectObject(hdc, mFont);
+ 127 const size_t size = ::GetFontData(hdc, 0, 0, NULL, 0);
+
+ 129 if (size != GDI_ERROR)
+
+ 131 fontData = std::make_unique<IFontData>(size);
+
+ 133 if (fontData->GetSize() == size)
+
+ 135 size_t result = ::GetFontData(hdc, 0x66637474, 0, fontData->Get(), size);
+ 136 if (result == GDI_ERROR)
+ 137 result = ::GetFontData(hdc, 0, 0, fontData->Get(), size);
+
+ 139 fontData->SetFaceIdx(GetFaceIdx(fontData->Get(), fontData->GetSize(), mStyleName.Get()));
+
+
+
+
+
+
+
+
+
+ 149 StaticStorage<IGraphicsWin::InstalledFont> IGraphicsWin::sPlatformFontCache;
+ 150 StaticStorage<IGraphicsWin::HFontHolder> IGraphicsWin::sHFontCache;
+
+ 152 #pragma mark - Mouse and tablet helpers
+
+ 154 extern float GetScaleForHWND(HWND hWnd);
+
+ 156 inline IMouseInfo IGraphicsWin::GetMouseInfo(LPARAM lParam, WPARAM wParam)
+
+
+ 159 const float scale = GetTotalScale();
+ 160 info.x = mCursorX = GET_X_LPARAM(lParam) / scale;
+ 161 info.y = mCursorY = GET_Y_LPARAM(lParam) / scale;
+ 162 info.ms =
IMouseMod ((wParam & MK_LBUTTON), (wParam & MK_RBUTTON), (wParam & MK_SHIFT), (wParam & MK_CONTROL),
+
+ 164 GetAsyncKeyState(VK_MENU) < 0
+
+ 166 GetKeyState(VK_MENU) < 0
+
+
+
+
+
+
+ 173 void IGraphicsWin::CheckTabletInput(UINT msg)
+
+ 175 if ((msg == WM_LBUTTONDOWN) || (msg == WM_RBUTTONDOWN) || (msg == WM_MBUTTONDOWN) || (msg == WM_MOUSEMOVE)
+ 176 || (msg == WM_RBUTTONDBLCLK) || (msg == WM_LBUTTONDBLCLK) || (msg == WM_MBUTTONDBLCLK)
+ 177 || (msg == WM_RBUTTONUP) || (msg == WM_LBUTTONUP) || (msg == WM_MBUTTONUP)
+ 178 || (msg == WM_MOUSEHOVER) || (msg == WM_MOUSELEAVE))
+
+ 180 const LONG_PTR c_SIGNATURE_MASK = 0xFFFFFF00;
+ 181 const LONG_PTR c_MOUSEEVENTF_FROMTOUCH = 0xFF515700;
+
+ 183 LONG_PTR extraInfo = GetMessageExtraInfo();
+ 184 SetTabletInput(((extraInfo & c_SIGNATURE_MASK) == c_MOUSEEVENTF_FROMTOUCH));
+ 185 mCursorLock &= !mTabletInput;
+
+
+
+ 189 void IGraphicsWin::DestroyEditWindow()
+
+
+
+ 193 SetWindowLongPtrW(mParamEditWnd, GWLP_WNDPROC, (LPARAM) mDefEditProc);
+ 194 DestroyWindow(mParamEditWnd);
+ 195 mParamEditWnd =
nullptr ;
+ 196 mDefEditProc =
nullptr ;
+ 197 DeleteObject(mEditFont);
+
+
+
+
+ 202 void IGraphicsWin::OnDisplayTimer(
int vBlankCount)
+
+
+ 205 DWORD msgCount = vBlankCount;
+ 206 DWORD curCount = mVBlankCount;
+
+
+
+
+ 211 if (mVBlankSkipUntil != 0 && mVBlankSkipUntil > mVBlankCount)
+
+
+
+
+ 216 mVBlankSkipUntil = 0;
+
+ 218 if (msgCount != curCount)
+
+
+
+
+
+
+
+ 226 if (mParamEditWnd && mParamEditMsg != kNone)
+
+ 228 switch (mParamEditMsg)
+
+
+
+ 232 WCHAR strWide[MAX_WIN32_PARAM_LEN];
+ 233 SendMessageW(mParamEditWnd, WM_GETTEXT, MAX_WIN32_PARAM_LEN, (LPARAM) strWide);
+ 234 SetControlValueAfterTextEdit(UTF16AsUTF8(strWide).Get());
+
+
+
+
+
+ 240 ClearInTextEntryControl();
+
+
+
+ 244 mParamEditMsg = kNone;
+
+
+
+
+
+
+
+ 252 float scale = GetScaleForHWND(mPlugWnd);
+ 253 if (scale != GetScreenScale())
+ 254 SetScreenScale(scale);
+
+
+
+
+
+ 260 const float totalScale = GetTotalScale();
+
+
+ 263 SetAllControlsClean();
+
+ 265 for (
int i = 0; i < rects.
Size (); i++)
+
+
+ 268 dirtyR.
Scale (totalScale);
+
+ 270 RECT r = { (LONG)dirtyR.L, (LONG)dirtyR.T, (LONG)dirtyR.R, (LONG)dirtyR.B };
+ 271 InvalidateRect(mPlugWnd, &r, FALSE);
+
+
+
+
+ 276 IRECT notDirtyR = mEditRECT;
+ 277 notDirtyR.
Scale (totalScale);
+
+ 279 RECT r2 = { (LONG)notDirtyR.L, (LONG)notDirtyR.T, (LONG)notDirtyR.R, (LONG)notDirtyR.B };
+ 280 ValidateRect(mPlugWnd, &r2);
+ 281 UpdateWindow(mPlugWnd);
+ 282 mParamEditMsg = kUpdate;
+
+
+
+
+ 287 UpdateWindow(mPlugWnd);
+
+
+
+
+ 292 curCount = mVBlankCount;
+ 293 if (msgCount != curCount)
+
+
+ 296 mVBlankSkipUntil = curCount+1;
+
+
+
+
+
+
+
+
+
+ 306 LRESULT CALLBACK IGraphicsWin::WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+
+ 308 if (msg == WM_CREATE)
+
+ 310 CREATESTRUCTW* lpcs = (CREATESTRUCTW *) lParam;
+ 311 SetWindowLongPtrW(hWnd, GWLP_USERDATA, (LPARAM) lpcs->lpCreateParams);
+
+
+ 314 if (pGraphics->mVSYNCEnabled)
+
+ 316 assert((pGraphics->FPS() == 60) &&
"If you want to run at frame rates other than 60FPS" );
+ 317 pGraphics->StartVBlankThread(hWnd);
+
+
+
+ 321 int mSec =
static_cast< int > (std::floorf(1000.0f / (pGraphics->FPS())));
+ 322 if (mSec < 20) mSec = 15;
+ 323 SetTimer(hWnd, IPLUG_TIMER_ID, mSec, NULL);
+
+
+
+ 327 DragAcceptFiles(hWnd,
true );
+
+
+
+
+
+ 333 if (!pGraphics || hWnd != pGraphics->mPlugWnd)
+
+ 335 return DefWindowProcW(hWnd, msg, wParam, lParam);
+
+
+ 338 if (pGraphics->mParamEditWnd && pGraphics->mParamEditMsg == kEditing)
+
+ 340 if (msg == WM_RBUTTONDOWN || (msg == WM_LBUTTONDOWN))
+
+ 342 pGraphics->mParamEditMsg = kCancel;
+
+
+ 345 return DefWindowProcW(hWnd, msg, wParam, lParam);
+
+
+ 348 auto IsTouchEvent = []() {
+ 349 const LONG_PTR c_SIGNATURE_MASK = 0xFFFFFF00;
+ 350 const LONG_PTR c_MOUSEEVENTF_FROMTOUCH = 0xFF515700;
+ 351 LONG_PTR extraInfo = GetMessageExtraInfo();
+ 352 return ((extraInfo & c_SIGNATURE_MASK) == c_MOUSEEVENTF_FROMTOUCH);
+
+
+ 355 pGraphics->CheckTabletInput(msg);
+
+
+
+
+ 360 pGraphics->OnDisplayTimer(wParam);
+
+
+
+ 364 if (wParam == IPLUG_TIMER_ID)
+ 365 pGraphics->OnDisplayTimer(0);
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 379 pGraphics->HideTooltip();
+ 380 if (pGraphics->mParamEditWnd)
+
+ 382 pGraphics->mParamEditMsg = kCommit;
+
+
+
+
+ 387 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
+ 388 std::vector<IMouseInfo> list{ info };
+ 389 pGraphics->OnMouseDown(list);
+
+
+
+
+ 394 pGraphics->OnSetCursor();
+
+
+
+
+
+
+
+ 402 if (!(wParam & (MK_LBUTTON | MK_RBUTTON)))
+
+ 404 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
+ 405 if (pGraphics->OnMouseOver(info.x, info.y, info.ms))
+
+ 407 TRACKMOUSEEVENT eventTrack = {
sizeof (TRACKMOUSEEVENT), TME_LEAVE, hWnd, HOVER_DEFAULT };
+ 408 if (pGraphics->TooltipsEnabled())
+
+ 410 int c = pGraphics->GetMouseOver();
+ 411 if (c != pGraphics->mTooltipIdx)
+
+ 413 if (c >= 0) eventTrack.dwFlags |= TME_HOVER;
+ 414 pGraphics->mTooltipIdx = c;
+ 415 pGraphics->HideTooltip();
+
+
+
+ 419 TrackMouseEvent(&eventTrack);
+
+
+ 422 else if (GetCapture() == hWnd && !pGraphics->IsInPlatformTextEntry())
+
+ 424 float oldX = pGraphics->mCursorX;
+ 425 float oldY = pGraphics->mCursorY;
+
+ 427 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
+
+ 429 info.dX = info.x - oldX;
+ 430 info.dY = info.y - oldY;
+
+ 432 if (info.dX || info.dY)
+
+ 434 std::vector<IMouseInfo> list{ info };
+ 435 pGraphics->OnMouseDrag(list);
+
+ 437 if (pGraphics->MouseCursorIsLocked())
+
+ 439 const float x = pGraphics->mHiddenCursorX;
+ 440 const float y = pGraphics->mHiddenCursorY;
+
+ 442 pGraphics->MoveMouseCursor(x, y);
+ 443 pGraphics->mHiddenCursorX = x;
+ 444 pGraphics->mHiddenCursorY = y;
+
+
+
+
+
+
+
+
+ 453 pGraphics->ShowTooltip();
+
+
+
+
+ 458 pGraphics->HideTooltip();
+ 459 pGraphics->OnMouseOut();
+
+
+
+
+
+
+ 466 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
+ 467 std::vector<IMouseInfo> list{ info };
+ 468 pGraphics->OnMouseUp(list);
+
+
+ 471 case WM_LBUTTONDBLCLK:
+ 472 case WM_RBUTTONDBLCLK:
+
+
+
+
+ 477 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
+ 478 if (pGraphics->OnMouseDblClick(info.x, info.y, info.ms))
+
+
+
+
+
+
+
+ 486 if (pGraphics->mParamEditWnd)
+
+ 488 pGraphics->mParamEditMsg = kCancel;
+
+
+
+
+ 493 IMouseInfo info = pGraphics->GetMouseInfo(lParam, wParam);
+ 494 float d = GET_WHEEL_DELTA_WPARAM(wParam) / WHEEL_DELTA;
+ 495 const float scale = pGraphics->GetTotalScale();
+
+ 497 GetWindowRect(hWnd, &r);
+ 498 pGraphics->OnMouseWheel(info.x - (r.left / scale), info.y - (r.top / scale), info.ms, d);
+
+
+
+
+
+ 504 UINT nTouches = LOWORD(wParam);
+
+
+
+ 508 WDL_TypedBuf<TOUCHINPUT> touches;
+ 509 touches.Resize(nTouches);
+ 510 HTOUCHINPUT hTouchInput = (HTOUCHINPUT) lParam;
+ 511 std::vector<IMouseInfo> downlist;
+ 512 std::vector<IMouseInfo> uplist;
+ 513 std::vector<IMouseInfo> movelist;
+ 514 const float scale = pGraphics->GetTotalScale();
+
+ 516 GetTouchInputInfo(hTouchInput, nTouches, touches.Get(),
sizeof (TOUCHINPUT));
+
+ 518 for (
int i = 0; i < nTouches; i++)
+
+ 520 TOUCHINPUT* pTI = touches.Get() +i;
+
+
+ 523 pt.x = TOUCH_COORD_TO_PIXEL(pTI->x);
+ 524 pt.y = TOUCH_COORD_TO_PIXEL(pTI->y);
+ 525 ScreenToClient(pGraphics->mPlugWnd, &pt);
+
+
+ 528 info.x =
static_cast< float > (pt.x) / scale;
+ 529 info.y =
static_cast< float > (pt.y) / scale;
+
+
+ 532 info.ms.touchRadius = 0;
+
+ 534 if (pTI->dwMask & TOUCHINPUTMASKF_CONTACTAREA)
+
+ 536 info.ms.touchRadius = pTI->cxContact;
+
+
+ 539 info.ms.touchID =
static_cast< ITouchID
> (pTI->dwID);
+
+ 541 if (pTI->dwFlags & TOUCHEVENTF_DOWN)
+
+ 543 downlist.push_back(info);
+ 544 pGraphics->mDeltaCapture.insert(std::make_pair(info.ms.touchID, info));
+
+ 546 else if (pTI->dwFlags & TOUCHEVENTF_UP)
+
+ 548 pGraphics->mDeltaCapture.erase(info.ms.touchID);
+ 549 uplist.push_back(info);
+
+ 551 else if (pTI->dwFlags & TOUCHEVENTF_MOVE)
+
+ 553 IMouseInfo previous = pGraphics->mDeltaCapture.find(info.ms.touchID)->second;
+ 554 info.dX = info.x - previous.x;
+ 555 info.dY = info.y - previous.y;
+ 556 movelist.push_back(info);
+ 557 pGraphics->mDeltaCapture[info.ms.touchID] = info;
+
+
+
+
+ 562 pGraphics->OnMouseDown(downlist);
+
+
+ 565 pGraphics->OnMouseUp(uplist);
+
+
+ 568 pGraphics->OnMouseDrag(movelist);
+
+ 570 CloseTouchInputHandle(hTouchInput);
+
+
+
+
+ 575 return DLGC_WANTALLKEYS;
+
+
+
+
+
+ 581 ScreenToClient(hWnd, &p);
+
+ 583 BYTE keyboardState[256] = {};
+ 584 GetKeyboardState(keyboardState);
+ 585 const int keyboardScanCode = (lParam >> 16) & 0x00ff;
+
+ 587 const int len = ToAscii(wParam, keyboardScanCode, keyboardState, &character, 0);
+
+
+
+
+ 592 if (len == 0 || len == 1)
+
+
+ 595 str[0] =
static_cast< char > (character);
+
+
+ 598 IKeyPress keyPress{ str,
static_cast< int > (wParam),
+ 599 static_cast< bool > (GetKeyState(VK_SHIFT) & 0x8000),
+ 600 static_cast< bool > (GetKeyState(VK_CONTROL) & 0x8000),
+ 601 static_cast< bool > (GetKeyState(VK_MENU) & 0x8000) };
+
+ 603 const float scale = pGraphics->GetTotalScale();
+
+ 605 if (msg == WM_KEYDOWN)
+ 606 handle = pGraphics->OnKeyDown(p.x / scale, p.y / scale, keyPress);
+
+ 608 handle = pGraphics->OnKeyUp(p.x / scale, p.y / scale, keyPress);
+
+
+
+
+ 613 HWND rootHWnd = GetAncestor( hWnd, GA_ROOT);
+ 614 SendMessageW(rootHWnd, msg, wParam, lParam);
+ 615 return DefWindowProcW(hWnd, msg, wParam, lParam);
+
+
+
+
+
+
+ 622 const float scale = pGraphics->GetTotalScale();
+ 623 auto addDrawRect = [pGraphics, scale](
IRECTList & rects, RECT r) {
+ 624 IRECT ir(r.left, r.top, r.right, r.bottom);
+
+
+
+
+
+ 630 HRGN region = CreateRectRgn(0, 0, 0, 0);
+ 631 int regionType = GetUpdateRgn(hWnd, region, FALSE);
+
+ 633 if ((regionType == COMPLEXREGION) || (regionType == SIMPLEREGION))
+
+
+ 636 const int bufferSize =
sizeof (RECT) * 64;
+ 637 unsigned char stackBuffer[
sizeof (RGNDATA) + bufferSize];
+ 638 RGNDATA* regionData = (RGNDATA*)stackBuffer;
+
+ 640 if (regionType == COMPLEXREGION && GetRegionData(region, bufferSize, regionData))
+
+ 642 for (
int i = 0; i < regionData->rdh.nCount; i++)
+ 643 addDrawRect(rects, *(((RECT*)regionData->Buffer) + i));
+
+
+
+
+ 648 GetRgnBox(region, &r);
+ 649 addDrawRect(rects, r);
+
+
+ 652 #if defined IGRAPHICS_GL
+
+ 654 BeginPaint(hWnd, &ps);
+
+
+
+ 658 pGraphics->ActivateGLContext();
+
+
+ 661 pGraphics->Draw(rects);
+
+
+ 664 SwapBuffers((HDC) pGraphics->GetPlatformContext());
+ 665 pGraphics->DeactivateGLContext();
+
+
+ 668 #if defined IGRAPHICS_GL || IGRAPHICS_D2D
+
+
+
+
+
+
+
+ 676 ValidateRect(hWnd, 0);
+
+ 678 DeleteObject(region);
+
+
+
+
+ 683 case WM_CTLCOLOREDIT:
+
+ 685 if (!pGraphics->mParamEditWnd)
+
+
+ 688 const IText & text = pGraphics->mEditText;
+ 689 HDC dc = (HDC) wParam;
+ 690 SetBkColor(dc, RGB(text.mTextEntryBGColor.R, text.mTextEntryBGColor.G, text.mTextEntryBGColor.B));
+ 691 SetTextColor(dc, RGB(text.mTextEntryFGColor.R, text.mTextEntryFGColor.G, text.mTextEntryFGColor.B));
+ 692 SetBkMode(dc, OPAQUE);
+ 693 SetDCBrushColor(dc, RGB(text.mTextEntryBGColor.R, text.mTextEntryBGColor.G, text.mTextEntryBGColor.B));
+ 694 return (LRESULT)GetStockObject(DC_BRUSH);
+
+
+
+ 698 HDROP hdrop = (HDROP) wParam;
+
+ 700 int numDroppedFiles = DragQueryFileW(hdrop, -1,
nullptr , 0);
+
+ 702 std::vector<std::vector<char>> pathBuffers(numDroppedFiles, std::vector<char>(1025, 0));
+ 703 std::vector<const char*> pathPtrs(numDroppedFiles);
+
+ 705 for (
int i = 0; i < numDroppedFiles; i++)
+
+ 707 wchar_t pathBufferW[1025] = {
'\0' };
+ 708 DragQueryFileW(hdrop, i, pathBufferW, 1024);
+ 709 strncpy(pathBuffers[i].data(), UTF16AsUTF8(pathBufferW).Get(), 1024);
+ 710 pathPtrs[i] = pathBuffers[i].data();
+
+
+ 713 DragQueryPoint(hdrop, &p);
+
+ 715 const float scale = pGraphics->GetTotalScale();
+
+ 717 if (numDroppedFiles==1)
+
+ 719 pGraphics->OnDrop(&pathPtrs[0][0], p.x / scale, p.y / scale);
+
+
+
+ 723 pGraphics->OnDropMultiple(pathPtrs, p.x / scale, p.y / scale);
+
+
+
+
+
+
+ 730 pGraphics->CloseWindow();
+
+
+
+
+
+
+
+
+
+
+
+ 742 return DefWindowProcW(hWnd, msg, wParam, lParam);
+
+
+
+ 746 LRESULT CALLBACK IGraphicsWin::ParamEditProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+
+
+
+ 750 if (pGraphics && pGraphics->mParamEditWnd && pGraphics->mParamEditWnd == hWnd)
+
+ 752 pGraphics->HideTooltip();
+
+
+
+
+
+
+ 759 if (pGraphics->mEditParam)
+
+
+
+ 763 if (c == 0x08)
break ;
+
+ 765 switch (pGraphics->mEditParam->
Type ())
+
+ 767 case IParam::kTypeEnum:
+ 768 case IParam::kTypeInt:
+ 769 case IParam::kTypeBool:
+ 770 if (c >=
'0' && c <=
'9' )
break ;
+ 771 else if (c ==
'-' )
break ;
+ 772 else if (c ==
'+' )
break ;
+
+ 774 case IParam::kTypeDouble:
+ 775 if (c >=
'0' && c <=
'9' )
break ;
+ 776 else if (c ==
'-' )
break ;
+ 777 else if (c ==
'+' )
break ;
+ 778 else if (c ==
'.' )
break ;
+
+
+
+
+
+
+
+
+
+ 788 if (wParam == VK_RETURN)
+
+ 790 pGraphics->mParamEditMsg = kCommit;
+
+
+ 793 else if (wParam == VK_ESCAPE)
+
+ 795 pGraphics->mParamEditMsg = kCancel;
+
+
+
+
+
+
+ 802 pGraphics->mParamEditMsg = kEditing;
+
+
+
+
+ 807 pGraphics->mParamEditMsg = kCommit;
+
+
+
+
+
+
+
+
+ 816 lres = CallWindowProcW(pGraphics->mDefEditProc, hWnd, WM_GETDLGCODE, wParam, lParam);
+
+ 818 if (lParam && ((MSG*)lParam)->message == WM_KEYDOWN && wParam == VK_RETURN)
+
+ 820 lres |= DLGC_WANTMESSAGE;
+
+
+
+
+
+ 826 switch HIWORD(wParam)
+
+
+
+ 830 if (pGraphics->mParamEditWnd)
+
+ 832 pGraphics->mParamEditMsg = kCommit;
+
+
+
+
+
+
+
+
+ 841 return CallWindowProcW(pGraphics->mDefEditProc, hWnd, msg, wParam, lParam);
+
+ 843 return DefWindowProcW(hWnd, msg, wParam, lParam);
+
+
+ 846 IGraphicsWin::IGraphicsWin(
IGEditorDelegate & dlg,
int w,
int h,
int fps,
float scale)
+ 847 : IGRAPHICS_DRAW_CLASS(dlg, w, h, fps, scale)
+
+ 849 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
+ 850 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
+ 851 fontStorage.Retain();
+ 852 hfontStorage.Retain();
+
+ 854 #ifndef IGRAPHICS_DISABLE_VSYNC
+ 855 mVSYNCEnabled = IsWindows8OrGreater();
+
+
+
+ 859 IGraphicsWin::~IGraphicsWin()
+
+ 861 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
+ 862 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
+ 863 fontStorage.Release();
+ 864 hfontStorage.Release();
+
+
+
+
+ 869 static void GetWindowSize(HWND pWnd,
int * pW,
int * pH)
+
+
+
+
+ 874 GetWindowRect(pWnd, &r);
+ 875 *pW = r.right - r.left;
+ 876 *pH = r.bottom - r.top;
+
+
+
+
+
+
+
+ 884 static bool IsChildWindow(HWND pWnd)
+
+
+
+ 888 int style = GetWindowLongW(pWnd, GWL_STYLE);
+ 889 int exStyle = GetWindowLongW(pWnd, GWL_EXSTYLE);
+ 890 return ((style & WS_CHILD) && !(exStyle & WS_EX_MDICHILD));
+
+
+
+
+ 895 void IGraphicsWin::ForceEndUserEdit()
+
+ 897 mParamEditMsg = kCancel;
+
+
+ 900 static UINT SETPOS_FLAGS = SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE;
+
+ 902 void IGraphicsWin::PlatformResize(
bool parentHasResized)
+
+
+
+ 906 HWND pParent = 0, pGrandparent = 0;
+ 907 int dlgW = 0, dlgH = 0, parentW = 0, parentH = 0, grandparentW = 0, grandparentH = 0;
+ 908 GetWindowSize(mPlugWnd, &dlgW, &dlgH);
+ 909 int dw = (WindowWidth() * GetScreenScale()) - dlgW, dh = (WindowHeight()* GetScreenScale()) - dlgH;
+
+ 911 if (IsChildWindow(mPlugWnd))
+
+ 913 pParent = GetParent(mPlugWnd);
+ 914 GetWindowSize(pParent, &parentW, &parentH);
+
+ 916 if (IsChildWindow(pParent))
+
+ 918 pGrandparent = GetParent(pParent);
+ 919 GetWindowSize(pGrandparent, &grandparentW, &grandparentH);
+
+
+
+
+
+
+ 926 SetWindowPos(mPlugWnd, 0, 0, 0, dlgW + dw, dlgH + dh, SETPOS_FLAGS);
+
+ 928 if (pParent && !parentHasResized)
+
+ 930 SetWindowPos(pParent, 0, 0, 0, parentW + dw, parentH + dh, SETPOS_FLAGS);
+
+
+ 933 if (pGrandparent && !parentHasResized)
+
+ 935 SetWindowPos(pGrandparent, 0, 0, 0, grandparentW + dw, grandparentH + dh, SETPOS_FLAGS);
+
+
+
+
+
+ 941 void IGraphicsWin::DrawResize()
+
+
+ 944 IGRAPHICS_DRAW_CLASS::DrawResize();
+ 945 DeactivateGLContext();
+
+
+
+ 949 void IGraphicsWin::HideMouseCursor(
bool hide,
bool lock)
+
+ 951 if (mCursorHidden == hide)
+
+
+
+
+ 956 mHiddenCursorX = mCursorX;
+ 957 mHiddenCursorY = mCursorY;
+
+
+ 960 mCursorHidden =
true ;
+ 961 mCursorLock = lock && !mTabletInput;
+
+
+
+
+ 966 MoveMouseCursor(mHiddenCursorX, mHiddenCursorY);
+
+
+ 969 mCursorHidden =
false ;
+
+
+
+
+ 974 void IGraphicsWin::MoveMouseCursor(
float x,
float y)
+
+
+
+
+ 979 const float scale = GetTotalScale();
+
+
+ 982 p.x = std::round(x * scale);
+ 983 p.y = std::round(y * scale);
+
+ 985 ::ClientToScreen(mPlugWnd, &p);
+
+ 987 if (SetCursorPos(p.x, p.y))
+
+
+ 990 ScreenToClient(mPlugWnd, &p);
+
+ 992 mHiddenCursorX = mCursorX = p.x / scale;
+ 993 mHiddenCursorY = mCursorY = p.y / scale;
+
+
+
+ 997 ECursor IGraphicsWin::SetMouseCursor(ECursor cursorType)
+
+
+
+
+
+ 1003 case ECursor::ARROW: cursor = LoadCursor(NULL, IDC_ARROW);
break ;
+ 1004 case ECursor::IBEAM: cursor = LoadCursor(NULL, IDC_IBEAM);
break ;
+ 1005 case ECursor::WAIT: cursor = LoadCursor(NULL, IDC_WAIT);
break ;
+ 1006 case ECursor::CROSS: cursor = LoadCursor(NULL, IDC_CROSS);
break ;
+ 1007 case ECursor::UPARROW: cursor = LoadCursor(NULL, IDC_UPARROW);
break ;
+ 1008 case ECursor::SIZENWSE: cursor = LoadCursor(NULL, IDC_SIZENWSE);
break ;
+ 1009 case ECursor::SIZENESW: cursor = LoadCursor(NULL, IDC_SIZENESW);
break ;
+ 1010 case ECursor::SIZEWE: cursor = LoadCursor(NULL, IDC_SIZEWE);
break ;
+ 1011 case ECursor::SIZENS: cursor = LoadCursor(NULL, IDC_SIZENS);
break ;
+ 1012 case ECursor::SIZEALL: cursor = LoadCursor(NULL, IDC_SIZEALL);
break ;
+ 1013 case ECursor::INO: cursor = LoadCursor(NULL, IDC_NO);
break ;
+ 1014 case ECursor::HAND: cursor = LoadCursor(NULL, IDC_HAND);
break ;
+ 1015 case ECursor::APPSTARTING: cursor = LoadCursor(NULL, IDC_APPSTARTING);
break ;
+ 1016 case ECursor::HELP: cursor = LoadCursor(NULL, IDC_HELP);
break ;
+
+ 1018 cursor = LoadCursor(NULL, IDC_ARROW);
+
+
+
+
+
+
+ 1025 bool IGraphicsWin::MouseCursorIsLocked()
+
+
+
+
+ 1030 void IGraphicsWin::GetMouseLocation(
float & x,
float &y)
const
+
+
+
+ 1034 ScreenToClient(mPlugWnd, &p);
+
+ 1036 const float scale = GetTotalScale();
+
+
+
+
+
+
+ 1043 void IGraphicsWin::CreateGLContext()
+
+ 1045 PIXELFORMATDESCRIPTOR pfd =
+
+ 1047 sizeof (PIXELFORMATDESCRIPTOR),
+
+ 1049 PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,
+
+
+
-
-
-
-
-
-
-
-
-
- 1064 HDC dc = GetDC(mPlugWnd);
- 1065 int fmt = ChoosePixelFormat(dc, &pfd);
- 1066 SetPixelFormat(dc, fmt, &pfd);
- 1067 mHGLRC = wglCreateContext(dc);
- 1068 wglMakeCurrent(dc, mHGLRC);
-
-
-
-
- 1073 auto wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress(
"wglCreateContextAttribsARB" );
-
- 1075 if (wglCreateContextAttribsARB)
-
- 1077 wglDeleteContext(mHGLRC);
-
- 1079 const int attribList[] = {
- 1080 WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
- 1081 WGL_CONTEXT_MINOR_VERSION_ARB, 3,
- 1082 WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
-
-
-
- 1086 mHGLRC = wglCreateContextAttribsARB(dc, 0, attribList);
- 1087 wglMakeCurrent(dc, mHGLRC);
-
-
-
-
-
-
- 1094 DBGMSG(
"Error initializing glad" );
-
-
-
- 1098 ReleaseDC(mPlugWnd, dc);
-
-
- 1101 void IGraphicsWin::DestroyGLContext()
-
- 1103 wglMakeCurrent(NULL, NULL);
- 1104 wglDeleteContext(mHGLRC);
-
-
- 1107 void IGraphicsWin::ActivateGLContext()
-
- 1109 mStartHDC = wglGetCurrentDC();
- 1110 mStartHGLRC = wglGetCurrentContext();
- 1111 HDC dc = GetDC(mPlugWnd);
- 1112 wglMakeCurrent(dc, mHGLRC);
-
-
- 1115 void IGraphicsWin::DeactivateGLContext()
-
- 1117 ReleaseDC(mPlugWnd, (HDC) GetPlatformContext());
- 1118 wglMakeCurrent(mStartHDC, mStartHGLRC);
-
-
-
- 1122 EMsgBoxResult IGraphicsWin::ShowMessageBox(
const char * text,
const char * caption, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler)
-
- 1124 ReleaseMouseCapture();
-
- 1126 EMsgBoxResult result =
static_cast< EMsgBoxResult
> (MessageBoxW(GetMainWnd(), UTF8AsUTF16(text).Get(), UTF8AsUTF16(caption).Get(),
static_cast< int > (type)));
-
- 1128 if (completionHandler)
- 1129 completionHandler(result);
-
-
-
-
- 1134 void * IGraphicsWin::OpenWindow(
void * pParent)
-
- 1136 mParentWnd = (HWND) pParent;
- 1137 int screenScale = GetScaleForHWND(mParentWnd);
- 1138 int x = 0, y = 0, w = WindowWidth() * screenScale, h = WindowHeight() * screenScale;
-
-
-
-
- 1143 GetWindowRect((HWND) pParent, &pR);
- 1144 GetWindowRect(mPlugWnd, &cR);
-
- 1146 x = cR.left - pR.left;
- 1147 y = cR.top - pR.top;
- 1148 w = cR.right - cR.left;
- 1149 h = cR.bottom - cR.top;
-
-
- 1152 if (nWndClassReg++ == 0)
-
- 1154 WNDCLASSW wndClass = { CS_DBLCLKS | CS_OWNDC, WndProc, 0, 0, mHInstance, 0, 0, 0, 0, wndClassName };
- 1155 RegisterClassW(&wndClass);
-
-
- 1158 mPlugWnd = CreateWindowW(wndClassName, L
"IPlug" , WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, x, y, w, h, mParentWnd, 0, mHInstance,
this );
-
- 1160 HDC dc = GetDC(mPlugWnd);
- 1161 SetPlatformContext(dc);
- 1162 ReleaseDC(mPlugWnd, dc);
-
-
-
-
-
- 1168 OnViewInitialized((
void *) dc);
-
- 1170 SetScreenScale(screenScale);
-
- 1172 GetDelegate()->LayoutUI(
this );
-
- 1174 if (MultiTouchEnabled() && GetSystemMetrics(SM_DIGITIZER) & NID_MULTI_INPUT)
-
- 1176 RegisterTouchWindow(mPlugWnd, 0);
-
-
- 1179 if (!mPlugWnd && --nWndClassReg == 0)
-
- 1181 UnregisterClassW(wndClassName, mHInstance);
-
-
-
- 1185 SetAllControlsDirty();
-
-
- 1188 if (mPlugWnd && TooltipsEnabled())
-
- 1190 static const INITCOMMONCONTROLSEX iccex = {
sizeof (INITCOMMONCONTROLSEX), ICC_TAB_CLASSES };
-
- 1192 if (InitCommonControlsEx(&iccex))
-
- 1194 mTooltipWnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | TTS_NOPREFIX | TTS_ALWAYSTIP,
- 1195 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, mPlugWnd, NULL, mHInstance, NULL);
-
-
- 1198 SetWindowPos(mTooltipWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- 1199 TOOLINFOW ti = { TTTOOLINFOW_V2_SIZE, TTF_IDISHWND | TTF_SUBCLASS, mPlugWnd, (UINT_PTR) mPlugWnd, {0, 0, 0, 0}, NULL, NULL, 0, NULL };
- 1200 SendMessageW(mTooltipWnd, TTM_ADDTOOLW, 0, (LPARAM) &ti);
- 1201 SendMessageW(mTooltipWnd, TTM_SETMAXTIPWIDTH, 0, TOOLTIPWND_MAXWIDTH);
-
-
-
-
- 1206 EnableTooltips(
false );
-
-
- 1209 wglMakeCurrent(NULL, NULL);
-
-
-
- 1213 GetDelegate()->OnUIOpen();
-
-
-
-
- 1218 static void GetWndClassName(HWND hWnd, WDL_String* pStr)
-
- 1220 wchar_t cStrW[MAX_CLASSNAME_LEN] = {
'\0' };
- 1221 GetClassNameW(hWnd, cStrW, MAX_CLASSNAME_LEN);
- 1222 pStr->Set(UTF16AsUTF8(cStrW).Get());
-
-
- 1225 BOOL CALLBACK IGraphicsWin::FindMainWindow(HWND hWnd, LPARAM lParam)
-
-
-
-
-
- 1231 GetWindowThreadProcessId(hWnd, &wPID);
-
- 1233 GetWndClassName(hWnd, &str);
- 1234 if (wPID == pGraphics->mPID && !strcmp(str.Get(), pGraphics->mMainWndClassName.Get()))
-
- 1236 pGraphics->mMainWnd = hWnd;
-
-
-
-
-
-
- 1243 HWND IGraphicsWin::GetMainWnd()
-
-
-
-
-
- 1249 HWND parentWnd = mParentWnd;
-
-
- 1252 mMainWnd = parentWnd;
- 1253 parentWnd = GetParent(mMainWnd);
-
-
- 1256 GetWndClassName(mMainWnd, &mMainWndClassName);
-
- 1258 else if (CStringHasContents(mMainWndClassName.Get()))
-
- 1260 mPID = GetCurrentProcessId();
- 1261 EnumWindows(FindMainWindow, (LPARAM)
this );
-
-
-
-
-
- 1267 IRECT IGraphicsWin::GetWindowRECT()
-
-
-
-
- 1272 GetWindowRect(mPlugWnd, &r);
- 1273 r.right -= TOOLWIN_BORDER_W;
- 1274 r.bottom -= TOOLWIN_BORDER_H;
- 1275 return IRECT (r.left, r.top, r.right, r.bottom);
-
-
-
-
- 1280 void IGraphicsWin::CloseWindow()
-
-
-
-
-
-
- 1287 KillTimer(mPlugWnd, IPLUG_TIMER_ID);
-
-
- 1290 ActivateGLContext();
-
-
-
-
-
- 1296 DeactivateGLContext();
-
-
-
- 1300 SetPlatformContext(
nullptr );
-
-
-
- 1304 DestroyWindow(mTooltipWnd);
-
- 1306 mShowingTooltip =
false ;
-
-
-
- 1310 DestroyWindow(mPlugWnd);
-
-
- 1313 if (--nWndClassReg == 0)
-
- 1315 UnregisterClassW(wndClassName, mHInstance);
-
-
-
-
- 1320 bool IGraphicsWin::PlatformSupportsMultiTouch()
const
-
- 1322 return GetSystemMetrics(SM_DIGITIZER) & NID_MULTI_INPUT;
-
-
- 1325 IPopupMenu * IGraphicsWin::GetItemMenu(
long idx,
long & idxInMenu,
long & offsetIdx,
IPopupMenu & baseMenu)
-
- 1327 long oldIDx = offsetIdx;
- 1328 offsetIdx += baseMenu.NItems();
-
- 1330 if (idx < offsetIdx)
-
- 1332 idxInMenu = idx - oldIDx;
-
-
-
-
-
- 1338 for (
int i = 0; i< baseMenu.NItems(); i++)
-
-
- 1341 if (pMenuItem->GetSubmenu())
-
- 1343 pMenu = GetItemMenu(idx, idxInMenu, offsetIdx, *pMenuItem->GetSubmenu());
-
-
-
-
-
-
-
-
-
- 1353 HMENU IGraphicsWin::CreateMenu(
IPopupMenu & menu,
long * pOffsetIdx)
-
- 1355 HMENU hMenu = ::CreatePopupMenu();
-
- 1357 WDL_String escapedText;
-
-
- 1360 long offset = *pOffsetIdx;
- 1361 long nItems = menu.NItems();
- 1362 *pOffsetIdx += nItems;
-
-
- 1365 for (
int i = 0; i < nItems; i++)
-
-
-
- 1369 if (pMenuItem->GetIsSeparator())
-
- 1371 AppendMenuW(hMenu, MF_SEPARATOR, 0, 0);
-
-
-
- 1375 const char * str = pMenuItem->GetText();
- 1376 int maxlen = strlen(str) + menu.GetPrefix() ? 50 : 0;
- 1377 WDL_String entryText(str);
-
- 1379 if (menu.GetPrefix())
-
- 1381 switch (menu.GetPrefix())
-
-
-
- 1385 entryText.SetFormatted(maxlen,
"%1d: %s" , i+1, str);
break ;
-
-
-
- 1389 entryText.SetFormatted(maxlen,
"%02d: %s" , i+1, str);
break ;
-
-
-
- 1393 entryText.SetFormatted(maxlen,
"%03d: %s" , i+1, str);
break ;
-
-
-
-
-
-
- 1400 if (strchr(entryText.Get(),
'&' ))
-
- 1402 for (
int c = 0; c < entryText.GetLength(); c++)
- 1403 if (entryText.Get()[c] ==
'&' )
- 1404 entryText.Insert(
"&" , c++);
-
-
-
- 1408 if (nItems < 160 && menu.NItemsPerColumn() > 0 && inc && !(inc % menu.NItemsPerColumn()))
- 1409 flags |= MF_MENUBARBREAK;
-
- 1411 if (pMenuItem->GetEnabled())
- 1412 flags |= MF_ENABLED;
-
-
- 1415 if (pMenuItem->GetIsTitle())
- 1416 flags |= MF_DISABLED;
- 1417 if (pMenuItem->GetChecked())
- 1418 flags |= MF_CHECKED;
-
- 1420 flags |= MF_UNCHECKED;
-
- 1422 if (pMenuItem->GetSubmenu())
-
- 1424 HMENU submenu = CreateMenu(*pMenuItem->GetSubmenu(), pOffsetIdx);
-
-
- 1427 AppendMenuW(hMenu, flags|MF_POPUP, (UINT_PTR)submenu, UTF8AsUTF16(entryText).Get());
-
-
-
-
- 1432 AppendMenuW(hMenu, flags, offset + inc, UTF8AsUTF16(entryText).Get());
-
-
-
-
-
-
-
-
-
-
-
- 1444 HMENU hMenu = CreateMenu(menu, &offsetIdx);
-
-
-
-
-
-
- 1451 const float scale = GetTotalScale();
-
- 1453 cPos.x = bounds.L * scale;
- 1454 cPos.y = bounds.B * scale;
-
- 1456 ::ClientToScreen(mPlugWnd, &cPos);
-
- 1458 if (TrackPopupMenu(hMenu, TPM_LEFTALIGN, cPos.x, cPos.y, 0, mPlugWnd, 0))
-
-
- 1461 if (PeekMessage(&msg, mPlugWnd, WM_COMMAND, WM_COMMAND, PM_REMOVE))
-
- 1463 if (HIWORD(msg.wParam) == 0)
-
- 1465 long res = LOWORD(msg.wParam);
-
-
-
-
- 1470 IPopupMenu * pReturnMenu = GetItemMenu(res, idx, offsetIdx, menu);
-
-
- 1473 result = pReturnMenu;
- 1474 result->SetChosenItemIdx(idx);
-
-
- 1477 if (pReturnMenu && pReturnMenu->GetFunction())
- 1478 pReturnMenu->ExecFunction();
-
-
-
-
-
-
-
- 1486 RECT r = { 0, 0,
static_cast< LONG
> (WindowWidth() * GetScreenScale()),
static_cast< LONG
> (WindowHeight() * GetScreenScale()) };
- 1487 InvalidateRect(mPlugWnd, &r, FALSE);
-
-
-
-
-
-
-
- 1495 void IGraphicsWin::CreatePlatformTextEntry(
int paramIdx,
const IText & text,
const IRECT & bounds,
int length,
const char * str)
-
-
-
-
-
-
- 1502 switch (text.mAlign)
-
- 1504 case EAlign::Near: editStyle = ES_LEFT;
break ;
- 1505 case EAlign::Far: editStyle = ES_RIGHT;
break ;
- 1506 case EAlign::Center:
- 1507 default : editStyle = ES_CENTER;
break ;
-
-
- 1510 const float scale = GetTotalScale();
-
-
- 1513 mParamEditWnd = CreateWindowW(L
"EDIT" , UTF8AsUTF16(str).Get(), ES_AUTOHSCROLL | WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | ES_MULTILINE | editStyle,
- 1514 scaledBounds.L, scaledBounds.T, scaledBounds.
W ()+1, scaledBounds.
H ()+1,
- 1515 mPlugWnd, (HMENU) PARAM_EDIT_ID, mHInstance, 0);
-
- 1517 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
-
- 1519 LOGFONTW lFont = { 0 };
- 1520 HFontHolder* hfontHolder = hfontStorage.Find(text.mFont);
- 1521 GetObjectW(hfontHolder->mHFont,
sizeof (LOGFONTW), &lFont);
- 1522 lFont.lfHeight = text.mSize * scale;
- 1523 mEditFont = CreateFontIndirectW(&lFont);
-
- 1525 assert(hfontHolder &&
"font not found - did you forget to load it?" );
-
- 1527 mEditParam = paramIdx > kNoParameter ? GetDelegate()->GetParam(paramIdx) :
nullptr ;
-
-
-
- 1531 SendMessageW(mParamEditWnd, EM_LIMITTEXT, (WPARAM) length, 0);
- 1532 SendMessageW(mParamEditWnd, WM_SETFONT, (WPARAM) mEditFont, 0);
- 1533 SendMessageW(mParamEditWnd, EM_SETSEL, 0, -1);
-
- 1535 if (text.mVAlign == EVAlign::Middle)
-
- 1537 double size = text.mSize * scale;
- 1538 double offset = (scaledBounds.
H () - size) / 2.0;
- 1539 RECT formatRect{0, (LONG) offset, (LONG) scaledBounds.
W () + 1, (LONG) scaledBounds.
H () + 1};
- 1540 SendMessageW(mParamEditWnd, EM_SETRECT, 0, (LPARAM) &formatRect);
-
-
- 1543 SetFocus(mParamEditWnd);
-
- 1545 mDefEditProc = (WNDPROC) SetWindowLongPtrW(mParamEditWnd, GWLP_WNDPROC, (LONG_PTR) ParamEditProc);
- 1546 SetWindowLongPtrW(mParamEditWnd, GWLP_USERDATA, 0xdeadf00b);
-
-
- 1549 bool IGraphicsWin::RevealPathInExplorerOrFinder(WDL_String& path,
bool select)
-
- 1551 bool success =
false ;
-
- 1553 if (path.GetLength())
-
- 1555 WCHAR winDir[IPLUG_WIN_MAX_WIDE_PATH];
- 1556 UINT len = GetSystemDirectoryW(winDir, IPLUG_WIN_MAX_WIDE_PATH);
-
- 1558 if (len && !(len > MAX_PATH - 2))
-
- 1560 winDir[len] = L
'\\' ;
- 1561 winDir[++len] = L
'\0' ;
-
- 1563 WDL_String explorerParams;
-
-
- 1566 explorerParams.Append(
"/select," );
-
- 1568 explorerParams.Append(
"\"" );
- 1569 explorerParams.Append(path.Get());
- 1570 explorerParams.Append(
"\\\"" );
-
-
-
- 1574 if ((result=::ShellExecuteW(NULL, L
"open" , L
"explorer.exe" , UTF8AsUTF16(explorerParams).Get(), winDir, SW_SHOWNORMAL)) <= (HINSTANCE) 32)
-
-
-
-
-
-
-
- 1582 void IGraphicsWin::PromptForFile(WDL_String& fileName, WDL_String& path, EFileAction action,
const char * ext, IFileDialogCompletionHandlerFunc completionHandler)
-
- 1584 if (!WindowIsOpen())
-
-
-
-
-
- 1590 wchar_t fileNameWide[_MAX_PATH];
-
- 1592 UTF8ToUTF16(fileNameWide, fileName.Get(), _MAX_PATH);
-
-
-
-
- 1597 UTF8AsUTF16 directoryWide(path);
-
-
- 1600 memset(&ofn, 0,
sizeof (OPENFILENAMEW));
-
- 1602 ofn.lStructSize =
sizeof (OPENFILENAMEW);
- 1603 ofn.hwndOwner = (HWND) GetWindow();
- 1604 ofn.lpstrFile = fileNameWide;
- 1605 ofn.nMaxFile = _MAX_PATH - 1;
- 1606 ofn.lpstrInitialDir = directoryWide.Get();
- 1607 ofn.Flags = OFN_PATHMUSTEXIST;
-
- 1609 if (CStringHasContents(ext))
-
- 1611 wchar_t extStr[256];
- 1612 wchar_t defExtStr[16];
- 1613 int i, p, n = strlen(ext);
- 1614 bool separator =
true ;
-
- 1616 for (i = 0, p = 0; i < n; ++i)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1631 extStr[p++] = ext[i];
-
-
-
- 1635 wcscpy(&extStr[p], extStr);
- 1636 extStr[p + p] =
'\0' ;
- 1637 ofn.lpstrFilter = extStr;
-
- 1639 for (i = 0, p = 0; i < n && ext[i] !=
' ' ; ++i)
- 1640 defExtStr[p++] = ext[i];
-
- 1642 defExtStr[p++] =
'\0' ;
- 1643 ofn.lpstrDefExt = defExtStr;
-
-
-
-
-
-
- 1650 case EFileAction::Save:
- 1651 ofn.Flags |= OFN_OVERWRITEPROMPT;
- 1652 rc = GetSaveFileNameW(&ofn);
-
- 1654 case EFileAction::Open:
-
- 1656 ofn.Flags |= OFN_FILEMUSTEXIST;
- 1657 rc = GetOpenFileNameW(&ofn);
-
-
-
-
-
- 1663 char drive[_MAX_DRIVE];
- 1664 char directoryOutCStr[_MAX_PATH];
-
- 1666 UTF16AsUTF8 tempUTF8(ofn.lpstrFile);
-
- 1668 if (_splitpath_s(tempUTF8.Get(), drive,
sizeof (drive), directoryOutCStr,
sizeof (directoryOutCStr), NULL, 0, NULL, 0) == 0)
-
-
- 1671 path.Append(directoryOutCStr);
-
-
- 1674 fileName.Set(tempUTF8.Get());
-
-
-
-
-
-
-
- 1682 if (completionHandler)
-
- 1684 completionHandler(fileName, path);
-
-
- 1687 ReleaseMouseCapture();
-
-
- 1690 void IGraphicsWin::PromptForDirectory(WDL_String& dir, IFileDialogCompletionHandlerFunc completionHandler)
-
-
- 1693 memset(&bi, 0,
sizeof (bi));
-
- 1695 bi.ulFlags = BIF_USENEWUI;
- 1696 bi.hwndOwner = mPlugWnd;
- 1697 bi.lpszTitle = L
"Choose a Directory" ;
-
-
- 1700 ::OleInitialize(NULL);
- 1701 LPITEMIDLIST pIDL = ::SHBrowseForFolderW(&bi);
-
-
-
- 1705 wchar_t buffer[_MAX_PATH] = {
'\0' };
-
- 1707 if (::SHGetPathFromIDListW(pIDL, buffer) != 0)
-
- 1709 dir.Set(UTF16AsUTF8(buffer).Get());
-
-
-
-
- 1714 CoTaskMemFree(pIDL);
-
-
-
-
-
-
- 1721 if (completionHandler)
-
- 1723 WDL_String fileName;
- 1724 completionHandler(fileName, dir);
-
-
- 1727 ReleaseMouseCapture();
-
- 1729 ::OleUninitialize();
-
-
- 1732 static UINT_PTR CALLBACK CCHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
-
- 1734 if (uiMsg == WM_INITDIALOG && lParam)
-
- 1736 CHOOSECOLORW* cc = (CHOOSECOLORW*) lParam;
- 1737 if (cc && cc->lCustData)
-
- 1739 const wchar_t * strWide = (
const wchar_t *) cc->lCustData;
- 1740 SetWindowTextW(hdlg, strWide);
-
- 1742 uiSetRGB = RegisterWindowMessageW(SETRGBSTRINGW);
- 1743 SendMessageW(hdlg, uiSetRGB, 0, (LPARAM) cc->rgbResult);
-
-
-
-
-
- 1749 bool IGraphicsWin::PromptForColor(
IColor & color,
const char * prompt, IColorPickerHandlerFunc func)
-
- 1751 ReleaseMouseCapture();
-
-
-
-
- 1756 UTF8AsUTF16 promptWide(prompt);
-
- 1758 const COLORREF w = RGB(255, 255, 255);
- 1759 static COLORREF customColorStorage[16] = { w, w, w, w, w, w, w, w, w, w, w, w, w, w, w, w };
-
-
- 1762 memset(&cc, 0,
sizeof (CHOOSECOLORW));
- 1763 cc.lStructSize =
sizeof (CHOOSECOLORW);
- 1764 cc.hwndOwner = mPlugWnd;
- 1765 cc.rgbResult = RGB(color.R, color.G, color.B);
- 1766 cc.lpCustColors = customColorStorage;
- 1767 cc.lCustData = (LPARAM) promptWide.Get();
- 1768 cc.lpfnHook = CCHookProc;
- 1769 cc.Flags = CC_RGBINIT | CC_ANYCOLOR | CC_FULLOPEN | CC_SOLIDCOLOR | CC_ENABLEHOOK;
-
- 1771 if (ChooseColorW(&cc))
-
- 1773 color.R = GetRValue(cc.rgbResult);
- 1774 color.G = GetGValue(cc.rgbResult);
- 1775 color.B = GetBValue(cc.rgbResult);
-
-
-
-
-
-
-
-
-
- 1785 bool IGraphicsWin::OpenURL(
const char * url,
const char * msgWindowTitle,
const char * confirmMsg,
const char * errMsgOnFailure)
-
- 1787 if (confirmMsg && MessageBoxW(mPlugWnd, UTF8AsUTF16(confirmMsg).Get(), UTF8AsUTF16(msgWindowTitle).Get(), MB_YESNO) != IDYES)
-
-
-
- 1791 DWORD inetStatus = 0;
- 1792 if (InternetGetConnectedState(&inetStatus, 0))
-
- 1794 if (ShellExecuteW(mPlugWnd, L
"open" , UTF8AsUTF16(url).Get(), 0, 0, SW_SHOWNORMAL) > HINSTANCE(32))
-
-
-
-
- 1799 if (errMsgOnFailure)
-
- 1801 MessageBoxW(mPlugWnd, UTF8AsUTF16(errMsgOnFailure).Get(), UTF8AsUTF16(msgWindowTitle).Get(), MB_OK);
-
-
-
-
- 1806 void IGraphicsWin::SetTooltip(
const char * tooltip)
-
- 1808 UTF8AsUTF16 tipWide(tooltip);
- 1809 TOOLINFOW ti = { TTTOOLINFOW_V2_SIZE, 0, mPlugWnd, (UINT_PTR) mPlugWnd, {0, 0, 0, 0}, NULL, NULL, 0, NULL };
- 1810 ti.lpszText =
const_cast< wchar_t *
> (tipWide.Get());
- 1811 SendMessageW(mTooltipWnd, TTM_UPDATETIPTEXTW, 0, (LPARAM) &ti);
-
-
- 1814 void IGraphicsWin::ShowTooltip()
-
- 1816 if (mTooltipIdx > -1)
-
- 1818 const char * tooltip = GetControl(mTooltipIdx)->GetTooltip();
-
-
- 1821 SetTooltip(tooltip);
- 1822 mShowingTooltip =
true ;
-
-
-
-
- 1827 void IGraphicsWin::HideTooltip()
-
- 1829 if (mShowingTooltip)
-
-
- 1832 mShowingTooltip =
false ;
-
-
-
- 1836 bool IGraphicsWin::GetTextFromClipboard(WDL_String& str)
-
- 1838 bool result =
false ;
-
- 1840 if (IsClipboardFormatAvailable(CF_UNICODETEXT))
-
- 1842 if (OpenClipboard(0))
-
- 1844 HGLOBAL hglb = GetClipboardData(CF_UNICODETEXT);
-
-
-
- 1848 WCHAR *origStr = (WCHAR*) GlobalLock(hglb);
-
-
-
- 1852 UTF16ToUTF8(str, origStr);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1868 bool IGraphicsWin::SetTextInClipboard(
const char * str)
-
- 1870 if (!OpenClipboard(mMainWnd))
-
-
-
-
-
-
-
-
-
- 1880 const int lenWide = UTF8ToUTF16Len(str);
-
-
- 1883 HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, lenWide*
sizeof (WCHAR));
-
-
-
-
-
-
-
- 1891 LPWSTR lpstrCopy = (LPWSTR) GlobalLock(hglbCopy);
-
-
-
-
- 1896 UTF8ToUTF16(lpstrCopy, str, lenWide);
- 1897 GlobalUnlock(hglbCopy);
-
-
- 1900 result = SetClipboardData(CF_UNICODETEXT, hglbCopy);
-
-
-
- 1904 GlobalFree(hglbCopy);
-
-
-
-
-
-
-
-
- 1913 bool IGraphicsWin::SetFilePathInClipboard(
const char * path)
-
- 1915 if (!OpenClipboard(mMainWnd))
-
-
-
-
- 1920 UTF8AsUTF16 pathWide(path);
-
-
-
- 1924 HGLOBAL hGlobal = GlobalAlloc(GHND,
sizeof (DROPFILES) + (
sizeof (
wchar_t ) * (pathWide.GetLength() + 1)));
-
-
-
-
- 1929 DROPFILES* pDropFiles = (DROPFILES*) GlobalLock(hGlobal);
- 1930 bool result =
false ;
-
-
-
-
-
- 1936 pDropFiles->pFiles =
sizeof (DROPFILES);
- 1937 pDropFiles->pt = { 0, 0 };
- 1938 pDropFiles->fNC =
true ;
- 1939 pDropFiles->fWide =
true ;
-
- 1941 std::copy_n(pathWide.Get(), pathWide.GetLength(),
reinterpret_cast< wchar_t *
> (&pDropFiles[1]));
-
- 1943 GlobalUnlock(hGlobal);
-
- 1945 result = SetClipboardData(CF_HDROP, hGlobal);
-
-
-
-
- 1950 GlobalFree(hGlobal);
-
-
-
-
-
- 1956 static HFONT GetHFont(
const char * fontName,
int weight,
bool italic,
bool underline, DWORD quality = DEFAULT_QUALITY,
bool enumerate =
false )
-
- 1958 HDC hdc = GetDC(NULL);
- 1959 HFONT font =
nullptr ;
-
-
-
-
- 1964 lFont.lfEscapement = 0;
- 1965 lFont.lfOrientation = 0;
- 1966 lFont.lfWeight = weight;
- 1967 lFont.lfItalic = italic;
- 1968 lFont.lfUnderline = underline;
- 1969 lFont.lfStrikeOut =
false ;
- 1970 lFont.lfCharSet = DEFAULT_CHARSET;
- 1971 lFont.lfOutPrecision = OUT_TT_PRECIS;
- 1972 lFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
- 1973 lFont.lfQuality = quality;
- 1974 lFont.lfPitchAndFamily = DEFAULT_PITCH;
-
- 1976 wcsncpy(lFont.lfFaceName, UTF8AsUTF16(fontName).Get(), LF_FACESIZE);
+
+
+
+
+
+
+
+
+
+
+ 1065 HDC dc = GetDC(mPlugWnd);
+ 1066 int fmt = ChoosePixelFormat(dc, &pfd);
+ 1067 SetPixelFormat(dc, fmt, &pfd);
+ 1068 mHGLRC = wglCreateContext(dc);
+ 1069 wglMakeCurrent(dc, mHGLRC);
+
+
+
+
+ 1074 auto wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC) wglGetProcAddress(
"wglCreateContextAttribsARB" );
+
+ 1076 if (wglCreateContextAttribsARB)
+
+ 1078 wglDeleteContext(mHGLRC);
+
+ 1080 const int attribList[] = {
+ 1081 WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
+ 1082 WGL_CONTEXT_MINOR_VERSION_ARB, 3,
+ 1083 WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
+
+
+
+ 1087 mHGLRC = wglCreateContextAttribsARB(dc, 0, attribList);
+ 1088 wglMakeCurrent(dc, mHGLRC);
+
+
+
+
+
+
+ 1095 DBGMSG(
"Error initializing glad" );
+
+
+
+ 1099 ReleaseDC(mPlugWnd, dc);
+
+
+ 1102 void IGraphicsWin::DestroyGLContext()
+
+ 1104 wglMakeCurrent(NULL, NULL);
+ 1105 wglDeleteContext(mHGLRC);
+
+
+ 1108 void IGraphicsWin::ActivateGLContext()
+
+ 1110 mStartHDC = wglGetCurrentDC();
+ 1111 mStartHGLRC = wglGetCurrentContext();
+ 1112 HDC dc = GetDC(mPlugWnd);
+ 1113 wglMakeCurrent(dc, mHGLRC);
+
+
+ 1116 void IGraphicsWin::DeactivateGLContext()
+
+ 1118 ReleaseDC(mPlugWnd, (HDC) GetPlatformContext());
+ 1119 wglMakeCurrent(mStartHDC, mStartHGLRC);
+
+
+
+ 1123 EMsgBoxResult IGraphicsWin::ShowMessageBox(
const char * text,
const char * caption, EMsgBoxType type, IMsgBoxCompletionHandlerFunc completionHandler)
+
+ 1125 ReleaseMouseCapture();
+
+ 1127 EMsgBoxResult result =
static_cast< EMsgBoxResult
> (MessageBoxW(GetMainWnd(), UTF8AsUTF16(text).Get(), UTF8AsUTF16(caption).Get(),
static_cast< int > (type)));
+
+ 1129 if (completionHandler)
+ 1130 completionHandler(result);
+
+
+
+
+ 1135 void * IGraphicsWin::OpenWindow(
void * pParent)
+
+ 1137 mParentWnd = (HWND) pParent;
+ 1138 int screenScale = GetScaleForHWND(mParentWnd);
+ 1139 int x = 0, y = 0, w = WindowWidth() * screenScale, h = WindowHeight() * screenScale;
+
+
+
+
+ 1144 GetWindowRect((HWND) pParent, &pR);
+ 1145 GetWindowRect(mPlugWnd, &cR);
+
+ 1147 x = cR.left - pR.left;
+ 1148 y = cR.top - pR.top;
+ 1149 w = cR.right - cR.left;
+ 1150 h = cR.bottom - cR.top;
+
+
+ 1153 if (nWndClassReg++ == 0)
+
+ 1155 WNDCLASSW wndClass = { CS_DBLCLKS | CS_OWNDC, WndProc, 0, 0, mHInstance, 0, 0, 0, 0, wndClassName };
+ 1156 RegisterClassW(&wndClass);
+
+
+ 1159 mPlugWnd = CreateWindowW(wndClassName, L
"IPlug" , WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, x, y, w, h, mParentWnd, 0, mHInstance,
this );
+
+ 1161 HDC dc = GetDC(mPlugWnd);
+ 1162 SetPlatformContext(dc);
+ 1163 ReleaseDC(mPlugWnd, dc);
+
+
+
+
+
+ 1169 OnViewInitialized((
void *) dc);
+
+ 1171 SetScreenScale(screenScale);
+
+ 1173 GetDelegate()->LayoutUI(
this );
+
+ 1175 if (MultiTouchEnabled() && GetSystemMetrics(SM_DIGITIZER) & NID_MULTI_INPUT)
+
+ 1177 RegisterTouchWindow(mPlugWnd, 0);
+
+
+ 1180 if (!mPlugWnd && --nWndClassReg == 0)
+
+ 1182 UnregisterClassW(wndClassName, mHInstance);
+
+
+
+ 1186 SetAllControlsDirty();
+
+
+ 1189 if (mPlugWnd && TooltipsEnabled())
+
+ 1191 static const INITCOMMONCONTROLSEX iccex = {
sizeof (INITCOMMONCONTROLSEX), ICC_TAB_CLASSES };
+
+ 1193 if (InitCommonControlsEx(&iccex))
+
+ 1195 mTooltipWnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | TTS_NOPREFIX | TTS_ALWAYSTIP,
+ 1196 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, mPlugWnd, NULL, mHInstance, NULL);
+
+
+ 1199 SetWindowPos(mTooltipWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ 1200 TOOLINFOW ti = { TTTOOLINFOW_V2_SIZE, TTF_IDISHWND | TTF_SUBCLASS, mPlugWnd, (UINT_PTR) mPlugWnd, {0, 0, 0, 0}, NULL, NULL, 0, NULL };
+ 1201 SendMessageW(mTooltipWnd, TTM_ADDTOOLW, 0, (LPARAM) &ti);
+ 1202 SendMessageW(mTooltipWnd, TTM_SETMAXTIPWIDTH, 0, TOOLTIPWND_MAXWIDTH);
+
+
+
+
+ 1207 EnableTooltips(
false );
+
+
+ 1210 wglMakeCurrent(NULL, NULL);
+
+
+
+ 1214 GetDelegate()->OnUIOpen();
+
+
+
+
+ 1219 static void GetWndClassName(HWND hWnd, WDL_String* pStr)
+
+ 1221 wchar_t cStrW[MAX_CLASSNAME_LEN] = {
'\0' };
+ 1222 GetClassNameW(hWnd, cStrW, MAX_CLASSNAME_LEN);
+ 1223 pStr->Set(UTF16AsUTF8(cStrW).Get());
+
+
+ 1226 BOOL CALLBACK IGraphicsWin::FindMainWindow(HWND hWnd, LPARAM lParam)
+
+
+
+
+
+ 1232 GetWindowThreadProcessId(hWnd, &wPID);
+
+ 1234 GetWndClassName(hWnd, &str);
+ 1235 if (wPID == pGraphics->mPID && !strcmp(str.Get(), pGraphics->mMainWndClassName.Get()))
+
+ 1237 pGraphics->mMainWnd = hWnd;
+
+
+
+
+
+
+ 1244 HWND IGraphicsWin::GetMainWnd()
+
+
+
+
+
+ 1250 HWND parentWnd = mParentWnd;
+
+
+ 1253 mMainWnd = parentWnd;
+ 1254 parentWnd = GetParent(mMainWnd);
+
+
+ 1257 GetWndClassName(mMainWnd, &mMainWndClassName);
+
+ 1259 else if (CStringHasContents(mMainWndClassName.Get()))
+
+ 1261 mPID = GetCurrentProcessId();
+ 1262 EnumWindows(FindMainWindow, (LPARAM)
this );
+
+
+
+
+
+ 1268 IRECT IGraphicsWin::GetWindowRECT()
+
+
+
+
+ 1273 GetWindowRect(mPlugWnd, &r);
+ 1274 r.right -= TOOLWIN_BORDER_W;
+ 1275 r.bottom -= TOOLWIN_BORDER_H;
+ 1276 return IRECT (r.left, r.top, r.right, r.bottom);
+
+
+
+
+ 1281 void IGraphicsWin::CloseWindow()
+
+
+
+
+
+
+ 1288 KillTimer(mPlugWnd, IPLUG_TIMER_ID);
+
+
+ 1291 ActivateGLContext();
+
+
+
+
+
+ 1297 DeactivateGLContext();
+
+
+
+ 1301 SetPlatformContext(
nullptr );
+
+
+
+ 1305 DestroyWindow(mTooltipWnd);
+
+ 1307 mShowingTooltip =
false ;
+
+
+
+ 1311 DestroyWindow(mPlugWnd);
+
+
+ 1314 if (--nWndClassReg == 0)
+
+ 1316 UnregisterClassW(wndClassName, mHInstance);
+
+
+
+
+ 1321 bool IGraphicsWin::PlatformSupportsMultiTouch()
const
+
+ 1323 return GetSystemMetrics(SM_DIGITIZER) & NID_MULTI_INPUT;
+
+
+ 1326 IPopupMenu * IGraphicsWin::GetItemMenu(
long idx,
long & idxInMenu,
long & offsetIdx,
IPopupMenu & baseMenu)
+
+ 1328 long oldIDx = offsetIdx;
+ 1329 offsetIdx += baseMenu.NItems();
+
+ 1331 if (idx < offsetIdx)
+
+ 1333 idxInMenu = idx - oldIDx;
+
+
+
+
+
+ 1339 for (
int i = 0; i< baseMenu.NItems(); i++)
+
+
+ 1342 if (pMenuItem->GetSubmenu())
+
+ 1344 pMenu = GetItemMenu(idx, idxInMenu, offsetIdx, *pMenuItem->GetSubmenu());
+
+
+
+
+
+
+
+
+
+ 1354 HMENU IGraphicsWin::CreateMenu(
IPopupMenu & menu,
long * pOffsetIdx)
+
+ 1356 HMENU hMenu = ::CreatePopupMenu();
+
+ 1358 WDL_String escapedText;
+
+
+ 1361 long offset = *pOffsetIdx;
+ 1362 long nItems = menu.NItems();
+ 1363 *pOffsetIdx += nItems;
+
+
+ 1366 for (
int i = 0; i < nItems; i++)
+
+
+
+ 1370 if (pMenuItem->GetIsSeparator())
+
+ 1372 AppendMenuW(hMenu, MF_SEPARATOR, 0, 0);
+
+
+
+ 1376 const char * str = pMenuItem->GetText();
+ 1377 int maxlen = strlen(str) + menu.GetPrefix() ? 50 : 0;
+ 1378 WDL_String entryText(str);
+
+ 1380 if (menu.GetPrefix())
+
+ 1382 switch (menu.GetPrefix())
+
+
+
+ 1386 entryText.SetFormatted(maxlen,
"%1d: %s" , i+1, str);
break ;
+
+
+
+ 1390 entryText.SetFormatted(maxlen,
"%02d: %s" , i+1, str);
break ;
+
+
+
+ 1394 entryText.SetFormatted(maxlen,
"%03d: %s" , i+1, str);
break ;
+
+
+
+
+
+
+ 1401 if (strchr(entryText.Get(),
'&' ))
+
+ 1403 for (
int c = 0; c < entryText.GetLength(); c++)
+ 1404 if (entryText.Get()[c] ==
'&' )
+ 1405 entryText.Insert(
"&" , c++);
+
+
+
+ 1409 if (nItems < 160 && menu.NItemsPerColumn() > 0 && inc && !(inc % menu.NItemsPerColumn()))
+ 1410 flags |= MF_MENUBARBREAK;
+
+ 1412 if (pMenuItem->GetEnabled())
+ 1413 flags |= MF_ENABLED;
+
+
+ 1416 if (pMenuItem->GetIsTitle())
+ 1417 flags |= MF_DISABLED;
+ 1418 if (pMenuItem->GetChecked())
+ 1419 flags |= MF_CHECKED;
+
+ 1421 flags |= MF_UNCHECKED;
+
+ 1423 if (pMenuItem->GetSubmenu())
+
+ 1425 HMENU submenu = CreateMenu(*pMenuItem->GetSubmenu(), pOffsetIdx);
+
+
+ 1428 AppendMenuW(hMenu, flags|MF_POPUP, (UINT_PTR)submenu, UTF8AsUTF16(entryText).Get());
+
+
+
+
+ 1433 AppendMenuW(hMenu, flags, offset + inc, UTF8AsUTF16(entryText).Get());
+
+
+
+
+
+
+
+
+
+
+
+ 1445 HMENU hMenu = CreateMenu(menu, &offsetIdx);
+
+
+
+
+
+
+ 1452 const float scale = GetTotalScale();
+
+ 1454 cPos.x = bounds.L * scale;
+ 1455 cPos.y = bounds.B * scale;
+
+ 1457 ::ClientToScreen(mPlugWnd, &cPos);
+
+ 1459 if (TrackPopupMenu(hMenu, TPM_LEFTALIGN, cPos.x, cPos.y, 0, mPlugWnd, 0))
+
+
+ 1462 if (PeekMessage(&msg, mPlugWnd, WM_COMMAND, WM_COMMAND, PM_REMOVE))
+
+ 1464 if (HIWORD(msg.wParam) == 0)
+
+ 1466 long res = LOWORD(msg.wParam);
+
+
+
+
+ 1471 IPopupMenu * pReturnMenu = GetItemMenu(res, idx, offsetIdx, menu);
+
+
+ 1474 result = pReturnMenu;
+ 1475 result->SetChosenItemIdx(idx);
+
+
+ 1478 if (pReturnMenu && pReturnMenu->GetFunction())
+ 1479 pReturnMenu->ExecFunction();
+
+
+
+
+
+
+
+ 1487 RECT r = { 0, 0,
static_cast< LONG
> (WindowWidth() * GetScreenScale()),
static_cast< LONG
> (WindowHeight() * GetScreenScale()) };
+ 1488 InvalidateRect(mPlugWnd, &r, FALSE);
+
+
+
+
+
+
+
+ 1496 void IGraphicsWin::CreatePlatformTextEntry(
int paramIdx,
const IText & text,
const IRECT & bounds,
int length,
const char * str)
+
+
+
+
+
+
+ 1503 switch (text.mAlign)
+
+ 1505 case EAlign::Near: editStyle = ES_LEFT;
break ;
+ 1506 case EAlign::Far: editStyle = ES_RIGHT;
break ;
+ 1507 case EAlign::Center:
+ 1508 default : editStyle = ES_CENTER;
break ;
+
+
+ 1511 const float scale = GetTotalScale();
+
+
+ 1514 mParamEditWnd = CreateWindowW(L
"EDIT" , UTF8AsUTF16(str).Get(), ES_AUTOHSCROLL | WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | ES_MULTILINE | editStyle,
+ 1515 scaledBounds.L, scaledBounds.T, scaledBounds.
W ()+1, scaledBounds.
H ()+1,
+ 1516 mPlugWnd, (HMENU) PARAM_EDIT_ID, mHInstance, 0);
+
+ 1518 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
+
+ 1520 LOGFONTW lFont = { 0 };
+ 1521 HFontHolder* hfontHolder = hfontStorage.Find(text.mFont);
+ 1522 GetObjectW(hfontHolder->mHFont,
sizeof (LOGFONTW), &lFont);
+ 1523 lFont.lfHeight = text.mSize * scale;
+ 1524 mEditFont = CreateFontIndirectW(&lFont);
+
+ 1526 assert(hfontHolder &&
"font not found - did you forget to load it?" );
+
+ 1528 mEditParam = paramIdx > kNoParameter ? GetDelegate()->GetParam(paramIdx) :
nullptr ;
+
+
+
+ 1532 SendMessageW(mParamEditWnd, EM_LIMITTEXT, (WPARAM) length, 0);
+ 1533 SendMessageW(mParamEditWnd, WM_SETFONT, (WPARAM) mEditFont, 0);
+ 1534 SendMessageW(mParamEditWnd, EM_SETSEL, 0, -1);
+
+ 1536 if (text.mVAlign == EVAlign::Middle)
+
+ 1538 double size = text.mSize * scale;
+ 1539 double offset = (scaledBounds.
H () - size) / 2.0;
+ 1540 RECT formatRect{0, (LONG) offset, (LONG) scaledBounds.
W () + 1, (LONG) scaledBounds.
H () + 1};
+ 1541 SendMessageW(mParamEditWnd, EM_SETRECT, 0, (LPARAM) &formatRect);
+
+
+ 1544 SetFocus(mParamEditWnd);
+
+ 1546 mDefEditProc = (WNDPROC) SetWindowLongPtrW(mParamEditWnd, GWLP_WNDPROC, (LONG_PTR) ParamEditProc);
+ 1547 SetWindowLongPtrW(mParamEditWnd, GWLP_USERDATA, 0xdeadf00b);
+
+
+ 1550 bool IGraphicsWin::RevealPathInExplorerOrFinder(WDL_String& path,
bool select)
+
+ 1552 bool success =
false ;
+
+ 1554 if (path.GetLength())
+
+ 1556 WCHAR winDir[IPLUG_WIN_MAX_WIDE_PATH];
+ 1557 UINT len = GetSystemDirectoryW(winDir, IPLUG_WIN_MAX_WIDE_PATH);
+
+ 1559 if (len && !(len > MAX_PATH - 2))
+
+ 1561 winDir[len] = L
'\\' ;
+ 1562 winDir[++len] = L
'\0' ;
+
+ 1564 WDL_String explorerParams;
+
+
+ 1567 explorerParams.Append(
"/select," );
+
+ 1569 explorerParams.Append(
"\"" );
+ 1570 explorerParams.Append(path.Get());
+ 1571 explorerParams.Append(
"\\\"" );
+
+
+
+ 1575 if ((result=::ShellExecuteW(NULL, L
"open" , L
"explorer.exe" , UTF8AsUTF16(explorerParams).Get(), winDir, SW_SHOWNORMAL)) <= (HINSTANCE) 32)
+
+
+
+
+
+
+
+ 1583 void IGraphicsWin::PromptForFile(WDL_String& fileName, WDL_String& path, EFileAction action,
const char * ext, IFileDialogCompletionHandlerFunc completionHandler)
+
+ 1585 if (!WindowIsOpen())
+
+
+
+
+
+ 1591 wchar_t fileNameWide[_MAX_PATH];
+
+ 1593 UTF8ToUTF16(fileNameWide, fileName.Get(), _MAX_PATH);
+
+
+
+
+ 1598 UTF8AsUTF16 directoryWide(path);
+
+
+ 1601 memset(&ofn, 0,
sizeof (OPENFILENAMEW));
+
+ 1603 ofn.lStructSize =
sizeof (OPENFILENAMEW);
+ 1604 ofn.hwndOwner = (HWND) GetWindow();
+ 1605 ofn.lpstrFile = fileNameWide;
+ 1606 ofn.nMaxFile = _MAX_PATH - 1;
+ 1607 ofn.lpstrInitialDir = directoryWide.Get();
+ 1608 ofn.Flags = OFN_PATHMUSTEXIST;
+
+ 1610 if (CStringHasContents(ext))
+
+ 1612 wchar_t extStr[256];
+ 1613 wchar_t defExtStr[16];
+ 1614 int i, p, n = strlen(ext);
+ 1615 bool separator =
true ;
+
+ 1617 for (i = 0, p = 0; i < n; ++i)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1632 extStr[p++] = ext[i];
+
+
+
+ 1636 wcscpy(&extStr[p], extStr);
+ 1637 extStr[p + p] =
'\0' ;
+ 1638 ofn.lpstrFilter = extStr;
+
+ 1640 for (i = 0, p = 0; i < n && ext[i] !=
' ' ; ++i)
+ 1641 defExtStr[p++] = ext[i];
+
+ 1643 defExtStr[p++] =
'\0' ;
+ 1644 ofn.lpstrDefExt = defExtStr;
+
+
+
+
+
+
+ 1651 case EFileAction::Save:
+ 1652 ofn.Flags |= OFN_OVERWRITEPROMPT;
+ 1653 rc = GetSaveFileNameW(&ofn);
+
+ 1655 case EFileAction::Open:
+
+ 1657 ofn.Flags |= OFN_FILEMUSTEXIST;
+ 1658 rc = GetOpenFileNameW(&ofn);
+
+
+
+
+
+ 1664 char drive[_MAX_DRIVE];
+ 1665 char directoryOutCStr[_MAX_PATH];
+
+ 1667 UTF16AsUTF8 tempUTF8(ofn.lpstrFile);
+
+ 1669 if (_splitpath_s(tempUTF8.Get(), drive,
sizeof (drive), directoryOutCStr,
sizeof (directoryOutCStr), NULL, 0, NULL, 0) == 0)
+
+
+ 1672 path.Append(directoryOutCStr);
+
+
+ 1675 fileName.Set(tempUTF8.Get());
+
+
+
+
+
+
+
+ 1683 if (completionHandler)
+
+ 1685 completionHandler(fileName, path);
+
+
+ 1688 ReleaseMouseCapture();
+
+
+ 1691 void IGraphicsWin::PromptForDirectory(WDL_String& dir, IFileDialogCompletionHandlerFunc completionHandler)
+
+
+ 1694 memset(&bi, 0,
sizeof (bi));
+
+ 1696 bi.ulFlags = BIF_USENEWUI;
+ 1697 bi.hwndOwner = mPlugWnd;
+ 1698 bi.lpszTitle = L
"Choose a Directory" ;
+
+
+ 1701 ::OleInitialize(NULL);
+ 1702 LPITEMIDLIST pIDL = ::SHBrowseForFolderW(&bi);
+
+
+
+ 1706 wchar_t buffer[_MAX_PATH] = {
'\0' };
+
+ 1708 if (::SHGetPathFromIDListW(pIDL, buffer) != 0)
+
+ 1710 dir.Set(UTF16AsUTF8(buffer).Get());
+
+
+
+
+ 1715 CoTaskMemFree(pIDL);
+
+
+
+
+
+
+ 1722 if (completionHandler)
+
+ 1724 WDL_String fileName;
+ 1725 completionHandler(fileName, dir);
+
+
+ 1728 ReleaseMouseCapture();
+
+ 1730 ::OleUninitialize();
+
+
+ 1733 static UINT_PTR CALLBACK CCHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+
+ 1735 if (uiMsg == WM_INITDIALOG && lParam)
+
+ 1737 CHOOSECOLORW* cc = (CHOOSECOLORW*) lParam;
+ 1738 if (cc && cc->lCustData)
+
+ 1740 const wchar_t * strWide = (
const wchar_t *) cc->lCustData;
+ 1741 SetWindowTextW(hdlg, strWide);
+
+ 1743 uiSetRGB = RegisterWindowMessageW(SETRGBSTRINGW);
+ 1744 SendMessageW(hdlg, uiSetRGB, 0, (LPARAM) cc->rgbResult);
+
+
+
+
+
+ 1750 bool IGraphicsWin::PromptForColor(
IColor & color,
const char * prompt, IColorPickerHandlerFunc func)
+
+ 1752 ReleaseMouseCapture();
+
+
+
+
+ 1757 UTF8AsUTF16 promptWide(prompt);
+
+ 1759 const COLORREF w = RGB(255, 255, 255);
+ 1760 static COLORREF customColorStorage[16] = { w, w, w, w, w, w, w, w, w, w, w, w, w, w, w, w };
+
+
+ 1763 memset(&cc, 0,
sizeof (CHOOSECOLORW));
+ 1764 cc.lStructSize =
sizeof (CHOOSECOLORW);
+ 1765 cc.hwndOwner = mPlugWnd;
+ 1766 cc.rgbResult = RGB(color.R, color.G, color.B);
+ 1767 cc.lpCustColors = customColorStorage;
+ 1768 cc.lCustData = (LPARAM) promptWide.Get();
+ 1769 cc.lpfnHook = CCHookProc;
+ 1770 cc.Flags = CC_RGBINIT | CC_ANYCOLOR | CC_FULLOPEN | CC_SOLIDCOLOR | CC_ENABLEHOOK;
+
+ 1772 if (ChooseColorW(&cc))
+
+ 1774 color.R = GetRValue(cc.rgbResult);
+ 1775 color.G = GetGValue(cc.rgbResult);
+ 1776 color.B = GetBValue(cc.rgbResult);
+
+
+
+
+
+
+
+
+
+ 1786 bool IGraphicsWin::OpenURL(
const char * url,
const char * msgWindowTitle,
const char * confirmMsg,
const char * errMsgOnFailure)
+
+ 1788 if (confirmMsg && MessageBoxW(mPlugWnd, UTF8AsUTF16(confirmMsg).Get(), UTF8AsUTF16(msgWindowTitle).Get(), MB_YESNO) != IDYES)
+
+
+
+ 1792 DWORD inetStatus = 0;
+ 1793 if (InternetGetConnectedState(&inetStatus, 0))
+
+ 1795 if (ShellExecuteW(mPlugWnd, L
"open" , UTF8AsUTF16(url).Get(), 0, 0, SW_SHOWNORMAL) > HINSTANCE(32))
+
+
+
+
+ 1800 if (errMsgOnFailure)
+
+ 1802 MessageBoxW(mPlugWnd, UTF8AsUTF16(errMsgOnFailure).Get(), UTF8AsUTF16(msgWindowTitle).Get(), MB_OK);
+
+
+
+
+ 1807 void IGraphicsWin::SetTooltip(
const char * tooltip)
+
+ 1809 UTF8AsUTF16 tipWide(tooltip);
+ 1810 TOOLINFOW ti = { TTTOOLINFOW_V2_SIZE, 0, mPlugWnd, (UINT_PTR) mPlugWnd, {0, 0, 0, 0}, NULL, NULL, 0, NULL };
+ 1811 ti.lpszText =
const_cast< wchar_t *
> (tipWide.Get());
+ 1812 SendMessageW(mTooltipWnd, TTM_UPDATETIPTEXTW, 0, (LPARAM) &ti);
+
+
+ 1815 void IGraphicsWin::ShowTooltip()
+
+ 1817 if (mTooltipIdx > -1)
+
+ 1819 const char * tooltip = GetControl(mTooltipIdx)->GetTooltip();
+
+
+ 1822 SetTooltip(tooltip);
+ 1823 mShowingTooltip =
true ;
+
+
+
+
+ 1828 void IGraphicsWin::HideTooltip()
+
+ 1830 if (mShowingTooltip)
+
+
+ 1833 mShowingTooltip =
false ;
+
+
+
+ 1837 bool IGraphicsWin::GetTextFromClipboard(WDL_String& str)
+
+ 1839 bool result =
false ;
+
+ 1841 if (IsClipboardFormatAvailable(CF_UNICODETEXT))
+
+ 1843 if (OpenClipboard(0))
+
+ 1845 HGLOBAL hglb = GetClipboardData(CF_UNICODETEXT);
+
+
+
+ 1849 WCHAR *origStr = (WCHAR*) GlobalLock(hglb);
+
+
+
+ 1853 UTF16ToUTF8(str, origStr);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1869 bool IGraphicsWin::SetTextInClipboard(
const char * str)
+
+ 1871 if (!OpenClipboard(mMainWnd))
+
+
+
+
+
+
+
+
+
+ 1881 const int lenWide = UTF8ToUTF16Len(str);
+
+
+ 1884 HGLOBAL hglbCopy = GlobalAlloc(GMEM_MOVEABLE, lenWide*
sizeof (WCHAR));
+
+
+
+
+
+
+
+ 1892 LPWSTR lpstrCopy = (LPWSTR) GlobalLock(hglbCopy);
+
+
+
+
+ 1897 UTF8ToUTF16(lpstrCopy, str, lenWide);
+ 1898 GlobalUnlock(hglbCopy);
+
+
+ 1901 result = SetClipboardData(CF_UNICODETEXT, hglbCopy);
+
+
+
+ 1905 GlobalFree(hglbCopy);
+
+
+
+
+
+
+
+
+ 1914 bool IGraphicsWin::SetFilePathInClipboard(
const char * path)
+
+ 1916 if (!OpenClipboard(mMainWnd))
+
+
+
+
+ 1921 UTF8AsUTF16 pathWide(path);
+
+
+
+ 1925 HGLOBAL hGlobal = GlobalAlloc(GHND,
sizeof (DROPFILES) + (
sizeof (
wchar_t ) * (pathWide.GetLength() + 1)));
+
+
+
+
+ 1930 DROPFILES* pDropFiles = (DROPFILES*) GlobalLock(hGlobal);
+ 1931 bool result =
false ;
+
+
+
+
+
+ 1937 pDropFiles->pFiles =
sizeof (DROPFILES);
+ 1938 pDropFiles->pt = { 0, 0 };
+ 1939 pDropFiles->fNC =
true ;
+ 1940 pDropFiles->fWide =
true ;
+
+ 1942 std::copy_n(pathWide.Get(), pathWide.GetLength(),
reinterpret_cast< wchar_t *
> (&pDropFiles[1]));
+
+ 1944 GlobalUnlock(hGlobal);
+
+ 1946 result = SetClipboardData(CF_HDROP, hGlobal);
+
+
+
+
+ 1951 GlobalFree(hGlobal);
+
+
+
+
+
+ 1957 bool IGraphicsWin::InitiateExternalFileDragDrop(
const char * path,
const IRECT & )
+
+ 1959 using namespace DragAndDropHelpers;
+ 1960 OleInitialize(
nullptr );
+
+ 1962 FORMATETC format = { CF_HDROP,
nullptr , DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
+
+
+
+
+
+ 1968 HRESULT ret = DoDragDrop(dataObj, dropSource, DROPEFFECT_COPY, &dropEffect);
+ 1969 bool success = SUCCEEDED(ret);
+
+
+ 1972 dropSource->Release();
+
+
+
+ 1976 ReleaseMouseCapture();
- 1978 auto enumProc = [](
const LOGFONTW* pLFont,
const TEXTMETRICW* pTextMetric, DWORD FontType, LPARAM lParam)
-
-
-
-
- 1983 if ((!enumerate || EnumFontFamiliesExW(hdc, &lFont, enumProc, NULL, 0) == -1))
- 1984 font = CreateFontIndirectW(&lFont);
-
-
-
- 1988 wchar_t selectedFontName[64] = {
'\0' };
-
- 1990 SelectFont(hdc, font);
- 1991 GetTextFaceW(hdc, 64, selectedFontName);
- 1992 if (strcmp(UTF16AsUTF8(selectedFontName).Get(), fontName))
-
-
-
-
-
-
- 1999 ReleaseDC(NULL, hdc);
+
+
+
+ 1981 static HFONT GetHFont(
const char * fontName,
int weight,
bool italic,
bool underline, DWORD quality = DEFAULT_QUALITY,
bool enumerate =
false )
+
+ 1983 HDC hdc = GetDC(NULL);
+ 1984 HFONT font =
nullptr ;
+
+
+
+
+ 1989 lFont.lfEscapement = 0;
+ 1990 lFont.lfOrientation = 0;
+ 1991 lFont.lfWeight = weight;
+ 1992 lFont.lfItalic = italic;
+ 1993 lFont.lfUnderline = underline;
+ 1994 lFont.lfStrikeOut =
false ;
+ 1995 lFont.lfCharSet = DEFAULT_CHARSET;
+ 1996 lFont.lfOutPrecision = OUT_TT_PRECIS;
+ 1997 lFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
+ 1998 lFont.lfQuality = quality;
+ 1999 lFont.lfPitchAndFamily = DEFAULT_PITCH;
-
-
-
- 2004 PlatformFontPtr IGraphicsWin::LoadPlatformFont(
const char * fontID,
const char * fileNameOrResID)
-
- 2006 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
-
- 2008 void * pFontMem =
nullptr ;
-
- 2010 WDL_String fullPath;
-
- 2012 const EResourceLocation fontLocation =
LocateResource (fileNameOrResID,
"ttf" , fullPath, GetBundleID(), GetWinModuleHandle(),
nullptr );
-
- 2014 if (fontLocation == kNotFound)
-
-
- 2017 switch (fontLocation)
-
-
-
- 2021 HANDLE file = CreateFileW(UTF8AsUTF16(fullPath).Get(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- 2022 PlatformFontPtr ret =
nullptr ;
-
-
- 2025 HANDLE mapping = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL);
-
-
- 2028 resSize = (int) GetFileSize(file,
nullptr );
- 2029 pFontMem = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0);
- 2030 ret = LoadPlatformFont(fontID, pFontMem, resSize);
- 2031 UnmapViewOfFile(pFontMem);
- 2032 CloseHandle(mapping);
-
-
-
-
-
-
-
-
- 2041 pFontMem =
const_cast< void *
> (
LoadWinResource (fullPath.Get(),
"ttf" , resSize, GetWinModuleHandle()));
- 2042 return LoadPlatformFont(fontID, pFontMem, resSize);
-
-
-
-
-
-
-
- 2050 PlatformFontPtr IGraphicsWin::LoadPlatformFont(
const char * fontID,
const char * fontName, ETextStyle style)
-
- 2052 int weight = style == ETextStyle::Bold ? FW_BOLD : FW_REGULAR;
- 2053 bool italic = style == ETextStyle::Italic;
- 2054 bool underline =
false ;
- 2055 DWORD quality = DEFAULT_QUALITY;
-
- 2057 HFONT font = GetHFont(fontName, weight, italic, underline, quality,
true );
-
- 2059 return PlatformFontPtr(font ?
new Font(font,
TextStyleString (style),
true ) :
nullptr );
-
-
- 2062 PlatformFontPtr IGraphicsWin::LoadPlatformFont(
const char * fontID,
void * pData,
int dataSize)
-
- 2064 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
-
- 2066 std::unique_ptr<InstalledFont> pFont;
- 2067 void * pFontMem = pData;
- 2068 int resSize = dataSize;
-
- 2070 pFont = std::make_unique<InstalledFont>(pFontMem, resSize);
+ 2001 wcsncpy(lFont.lfFaceName, UTF8AsUTF16(fontName).Get(), LF_FACESIZE);
+
+ 2003 auto enumProc = [](
const LOGFONTW* pLFont,
const TEXTMETRICW* pTextMetric, DWORD FontType, LPARAM lParam)
+
+
+
+
+ 2008 if ((!enumerate || EnumFontFamiliesExW(hdc, &lFont, enumProc, NULL, 0) == -1))
+ 2009 font = CreateFontIndirectW(&lFont);
+
+
+
+ 2013 wchar_t selectedFontName[64] = {
'\0' };
+
+ 2015 SelectFont(hdc, font);
+ 2016 GetTextFaceW(hdc, 64, selectedFontName);
+ 2017 if (strcmp(UTF16AsUTF8(selectedFontName).Get(), fontName))
+
+
+
+
+
+
+ 2024 ReleaseDC(NULL, hdc);
+
+
+
+
+ 2029 PlatformFontPtr IGraphicsWin::LoadPlatformFont(
const char * fontID,
const char * fileNameOrResID)
+
+ 2031 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
+
+ 2033 void * pFontMem =
nullptr ;
+
+ 2035 WDL_String fullPath;
+
+ 2037 const EResourceLocation fontLocation =
LocateResource (fileNameOrResID,
"ttf" , fullPath, GetBundleID(), GetWinModuleHandle(),
nullptr );
+
+ 2039 if (fontLocation == kNotFound)
+
+
+ 2042 switch (fontLocation)
+
+
+
+ 2046 HANDLE file = CreateFileW(UTF8AsUTF16(fullPath).Get(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ 2047 PlatformFontPtr ret =
nullptr ;
+
+
+ 2050 HANDLE mapping = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL);
+
+
+ 2053 resSize = (int) GetFileSize(file,
nullptr );
+ 2054 pFontMem = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0);
+ 2055 ret = LoadPlatformFont(fontID, pFontMem, resSize);
+ 2056 UnmapViewOfFile(pFontMem);
+ 2057 CloseHandle(mapping);
+
+
+
+
+
+
+
+
+ 2066 pFontMem =
const_cast< void *
> (
LoadWinResource (fullPath.Get(),
"ttf" , resSize, GetWinModuleHandle()));
+ 2067 return LoadPlatformFont(fontID, pFontMem, resSize);
+
+
+
- 2072 if (pFontMem && pFont && pFont->IsValid())
-
- 2074 IFontInfo fontInfo(pFontMem, resSize, 0);
- 2075 WDL_String family = fontInfo.GetFamily();
- 2076 int weight = fontInfo.IsBold() ? FW_BOLD : FW_REGULAR;
- 2077 bool italic = fontInfo.IsItalic();
- 2078 bool underline = fontInfo.IsUnderline();
-
- 2080 HFONT font = GetHFont(family.Get(), weight, italic, underline);
+
+
+
+ 2075 PlatformFontPtr IGraphicsWin::LoadPlatformFont(
const char * fontID,
const char * fontName, ETextStyle style)
+
+ 2077 int weight = style == ETextStyle::Bold ? FW_BOLD : FW_REGULAR;
+ 2078 bool italic = style == ETextStyle::Italic;
+ 2079 bool underline =
false ;
+ 2080 DWORD quality = DEFAULT_QUALITY;
-
-
- 2084 fontStorage.Add(pFont.release(), fontID);
- 2085 return PlatformFontPtr(
new Font(font,
"" ,
false ));
-
-
-
-
-
-
- 2092 void IGraphicsWin::CachePlatformFont(
const char * fontID,
const PlatformFontPtr& font)
-
- 2094 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
-
- 2096 HFONT hfont = font->GetDescriptor();
-
- 2098 if (!hfontStorage.Find(fontID))
- 2099 hfontStorage.Add(
new HFontHolder(hfont), fontID);
-
-
- 2102 DWORD WINAPI VBlankRun(LPVOID lpParam)
-
-
- 2105 return pGraphics->OnVBlankRun();
-
-
- 2108 void IGraphicsWin::StartVBlankThread(HWND hWnd)
-
- 2110 mVBlankWindow = hWnd;
- 2111 mVBlankShutdown =
false ;
-
- 2113 mVBlankThread = ::CreateThread(NULL, 0, VBlankRun,
this , 0, &threadId);
-
-
- 2116 void IGraphicsWin::StopVBlankThread()
-
- 2118 if (mVBlankThread != INVALID_HANDLE_VALUE)
-
- 2120 mVBlankShutdown =
true ;
- 2121 ::WaitForSingleObject(mVBlankThread, 10000);
- 2122 mVBlankThread = INVALID_HANDLE_VALUE;
-
-
+ 2082 HFONT font = GetHFont(fontName, weight, italic, underline, quality,
true );
+
+ 2084 return PlatformFontPtr(font ?
new Font(font,
TextStyleString (style),
true ) :
nullptr );
+
+
+ 2087 PlatformFontPtr IGraphicsWin::LoadPlatformFont(
const char * fontID,
void * pData,
int dataSize)
+
+ 2089 StaticStorage<InstalledFont>::Accessor fontStorage(sPlatformFontCache);
+
+ 2091 std::unique_ptr<InstalledFont> pFont;
+ 2092 void * pFontMem = pData;
+ 2093 int resSize = dataSize;
+
+ 2095 pFont = std::make_unique<InstalledFont>(pFontMem, resSize);
+
+ 2097 if (pFontMem && pFont && pFont->IsValid())
+
+ 2099 IFontInfo fontInfo(pFontMem, resSize, 0);
+ 2100 WDL_String family = fontInfo.GetFamily();
+ 2101 int weight = fontInfo.IsBold() ? FW_BOLD : FW_REGULAR;
+ 2102 bool italic = fontInfo.IsItalic();
+ 2103 bool underline = fontInfo.IsUnderline();
+
+ 2105 HFONT font = GetHFont(family.Get(), weight, italic, underline);
+
+
+
+ 2109 fontStorage.Add(pFont.release(), fontID);
+ 2110 return PlatformFontPtr(
new Font(font,
"" ,
false ));
+
+
+
+
+
+
+ 2117 void IGraphicsWin::CachePlatformFont(
const char * fontID,
const PlatformFontPtr& font)
+
+ 2119 StaticStorage<HFontHolder>::Accessor hfontStorage(sHFontCache);
+
+ 2121 HFONT hfont = font->GetDescriptor();
+
+ 2123 if (!hfontStorage.Find(fontID))
+ 2124 hfontStorage.Add(
new HFontHolder(hfont), fontID);
-
-
-
-
-
-
-
-
-
-
-
- 2138 typedef UINT32 D3DKMT_HANDLE;
- 2139 typedef UINT D3DDDI_VIDEO_PRESENT_SOURCE_ID;
+ 2127 DWORD WINAPI VBlankRun(LPVOID lpParam)
+
+
+ 2130 return pGraphics->OnVBlankRun();
+
+
+ 2133 void IGraphicsWin::StartVBlankThread(HWND hWnd)
+
+ 2135 mVBlankWindow = hWnd;
+ 2136 mVBlankShutdown =
false ;
+
+ 2138 mVBlankThread = ::CreateThread(NULL, 0, VBlankRun,
this , 0, &threadId);
+
- 2141 typedef struct _D3DKMT_OPENADAPTERFROMHDC
+ 2141 void IGraphicsWin::StopVBlankThread()
-
- 2144 D3DKMT_HANDLE hAdapter;
-
- 2146 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
- 2147 } D3DKMT_OPENADAPTERFROMHDC;
-
- 2149 typedef struct _D3DKMT_CLOSEADAPTER
-
- 2151 D3DKMT_HANDLE hAdapter;
- 2152 } D3DKMT_CLOSEADAPTER;
-
- 2154 typedef struct _D3DKMT_WAITFORVERTICALBLANKEVENT
-
- 2156 D3DKMT_HANDLE hAdapter;
- 2157 D3DKMT_HANDLE hDevice;
- 2158 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
- 2159 } D3DKMT_WAITFORVERTICALBLANKEVENT;
-
-
- 2162 typedef NTSTATUS(WINAPI* D3DKMTOpenAdapterFromHdc)(D3DKMT_OPENADAPTERFROMHDC* Arg1);
- 2163 typedef NTSTATUS(WINAPI* D3DKMTCloseAdapter)(
const D3DKMT_CLOSEADAPTER* Arg1);
- 2164 typedef NTSTATUS(WINAPI* D3DKMTWaitForVerticalBlankEvent)(
const D3DKMT_WAITFORVERTICALBLANKEVENT* Arg1);
+ 2143 if (mVBlankThread != INVALID_HANDLE_VALUE)
+
+ 2145 mVBlankShutdown =
true ;
+ 2146 ::WaitForSingleObject(mVBlankThread, 10000);
+ 2147 mVBlankThread = INVALID_HANDLE_VALUE;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2163 typedef UINT32 D3DKMT_HANDLE;
+ 2164 typedef UINT D3DDDI_VIDEO_PRESENT_SOURCE_ID;
- 2166 DWORD IGraphicsWin::OnVBlankRun()
+ 2166 typedef struct _D3DKMT_OPENADAPTERFROMHDC
- 2168 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
-
-
-
- 2172 float rateFallback = 60.0f;
- 2173 int rateMS = (int)(1000.0f / rateFallback);
-
-
-
-
-
-
-
- 2181 D3DKMTOpenAdapterFromHdc pOpen =
nullptr ;
- 2182 D3DKMTCloseAdapter pClose =
nullptr ;
- 2183 D3DKMTWaitForVerticalBlankEvent pWait =
nullptr ;
- 2184 HINSTANCE hInst = LoadLibraryW(L
"gdi32.dll" );
+
+ 2169 D3DKMT_HANDLE hAdapter;
+
+ 2171 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
+ 2172 } D3DKMT_OPENADAPTERFROMHDC;
+
+ 2174 typedef struct _D3DKMT_CLOSEADAPTER
+
+ 2176 D3DKMT_HANDLE hAdapter;
+ 2177 } D3DKMT_CLOSEADAPTER;
+
+ 2179 typedef struct _D3DKMT_WAITFORVERTICALBLANKEVENT
+
+ 2181 D3DKMT_HANDLE hAdapter;
+ 2182 D3DKMT_HANDLE hDevice;
+ 2183 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
+ 2184 } D3DKMT_WAITFORVERTICALBLANKEVENT;
- 2186 if (hInst !=
nullptr )
-
- 2188 pOpen = (D3DKMTOpenAdapterFromHdc) GetProcAddress((HMODULE) hInst,
"D3DKMTOpenAdapterFromHdc" );
- 2189 pClose = (D3DKMTCloseAdapter) GetProcAddress((HMODULE) hInst,
"D3DKMTCloseAdapter" );
- 2190 pWait = (D3DKMTWaitForVerticalBlankEvent) GetProcAddress((HMODULE) hInst,
"D3DKMTWaitForVerticalBlankEvent" );
-
-
-
-
-
-
- 2197 if (!pOpen || !pClose || !pWait)
-
- 2199 while (mVBlankShutdown ==
false )
-
-
-
-
-
-
-
-
-
- 2209 bool adapterIsOpen =
false ;
- 2210 DWORD adapterLastFailTime = 0;
- 2211 _D3DKMT_WAITFORVERTICALBLANKEVENT we = { 0 };
-
- 2213 while (mVBlankShutdown ==
false )
-
-
-
-
- 2218 if (adapterLastFailTime < ::GetTickCount() - 1000)
-
-
- 2221 D3DKMT_OPENADAPTERFROMHDC openAdapterData = { 0 };
- 2222 HDC hDC = GetDC(mVBlankWindow);
- 2223 openAdapterData.hDc = hDC;
- 2224 NTSTATUS status = (*pOpen)(&openAdapterData);
-
-
-
- 2228 adapterLastFailTime = 0;
- 2229 adapterIsOpen =
true ;
- 2230 we.hAdapter = openAdapterData.hAdapter;
-
- 2232 we.VidPnSourceId = openAdapterData.VidPnSourceId;
-
-
-
-
- 2237 adapterLastFailTime = ::GetTickCount();
-
-
-
-
-
-
-
-
- 2246 NTSTATUS status = (*pWait)(&we);
-
-
-
- 2250 _D3DKMT_CLOSEADAPTER ca;
- 2251 ca.hAdapter = we.hAdapter;
-
- 2253 adapterIsOpen =
false ;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2270 _D3DKMT_CLOSEADAPTER ca;
- 2271 ca.hAdapter = we.hAdapter;
-
- 2273 adapterIsOpen =
false ;
-
-
-
-
- 2278 if (hInst !=
nullptr )
-
- 2280 FreeLibrary((HMODULE)hInst);
-
-
-
-
-
-
- 2287 void IGraphicsWin::VBlankNotify()
-
-
- 2290 ::PostMessageW(mVBlankWindow, WM_VBLANK, mVBlankCount, 0);
-
-
-
- 2294 #if defined IGRAPHICS_SKIA
- 2295 #include "IGraphicsSkia.cpp"
-
-
-
- 2299 #elif defined IGRAPHICS_NANOVG
- 2300 #include "IGraphicsNanoVG.cpp"
- 2301 #ifdef IGRAPHICS_FREETYPE
- 2302 #define FONS_USE_FREETYPE
- 2303 #pragma comment(lib, "freetype.lib" )
-
-
-
-
-
-
-
+
+ 2187 typedef NTSTATUS(WINAPI* D3DKMTOpenAdapterFromHdc)(D3DKMT_OPENADAPTERFROMHDC* Arg1);
+ 2188 typedef NTSTATUS(WINAPI* D3DKMTCloseAdapter)(
const D3DKMT_CLOSEADAPTER* Arg1);
+ 2189 typedef NTSTATUS(WINAPI* D3DKMTWaitForVerticalBlankEvent)(
const D3DKMT_WAITFORVERTICALBLANKEVENT* Arg1);
+
+ 2191 DWORD IGraphicsWin::OnVBlankRun()
+
+ 2193 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
+
+
+
+ 2197 float rateFallback = 60.0f;
+ 2198 int rateMS = (int)(1000.0f / rateFallback);
+
+
+
+
+
+
+
+ 2206 D3DKMTOpenAdapterFromHdc pOpen =
nullptr ;
+ 2207 D3DKMTCloseAdapter pClose =
nullptr ;
+ 2208 D3DKMTWaitForVerticalBlankEvent pWait =
nullptr ;
+ 2209 HINSTANCE hInst = LoadLibraryW(L
"gdi32.dll" );
+
+ 2211 if (hInst !=
nullptr )
+
+ 2213 pOpen = (D3DKMTOpenAdapterFromHdc) GetProcAddress((HMODULE) hInst,
"D3DKMTOpenAdapterFromHdc" );
+ 2214 pClose = (D3DKMTCloseAdapter) GetProcAddress((HMODULE) hInst,
"D3DKMTCloseAdapter" );
+ 2215 pWait = (D3DKMTWaitForVerticalBlankEvent) GetProcAddress((HMODULE) hInst,
"D3DKMTWaitForVerticalBlankEvent" );
+
+
+
+
+
+
+ 2222 if (!pOpen || !pClose || !pWait)
+
+ 2224 while (mVBlankShutdown ==
false )
+
+
+
+
+
+
+
+
+
+ 2234 bool adapterIsOpen =
false ;
+ 2235 DWORD adapterLastFailTime = 0;
+ 2236 _D3DKMT_WAITFORVERTICALBLANKEVENT we = { 0 };
+
+ 2238 while (mVBlankShutdown ==
false )
+
+
+
+
+ 2243 if (adapterLastFailTime < ::GetTickCount() - 1000)
+
+
+ 2246 D3DKMT_OPENADAPTERFROMHDC openAdapterData = { 0 };
+ 2247 HDC hDC = GetDC(mVBlankWindow);
+ 2248 openAdapterData.hDc = hDC;
+ 2249 NTSTATUS status = (*pOpen)(&openAdapterData);
+
+
+
+ 2253 adapterLastFailTime = 0;
+ 2254 adapterIsOpen =
true ;
+ 2255 we.hAdapter = openAdapterData.hAdapter;
+
+ 2257 we.VidPnSourceId = openAdapterData.VidPnSourceId;
+
+
+
+
+ 2262 adapterLastFailTime = ::GetTickCount();
+
+
+
+
+
+
+
+
+ 2271 NTSTATUS status = (*pWait)(&we);
+
+
+
+ 2275 _D3DKMT_CLOSEADAPTER ca;
+ 2276 ca.hAdapter = we.hAdapter;
+
+ 2278 adapterIsOpen =
false ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2295 _D3DKMT_CLOSEADAPTER ca;
+ 2296 ca.hAdapter = we.hAdapter;
+
+ 2298 adapterIsOpen =
false ;
+
+
+
+
+ 2303 if (hInst !=
nullptr )
+
+ 2305 FreeLibrary((HMODULE)hInst);
+
+
+
+
+
+
+ 2312 void IGraphicsWin::VBlankNotify()
+
+
+ 2315 ::PostMessageW(mVBlankWindow, WM_VBLANK, mVBlankCount, 0);
+
+
+
+ 2319 #if defined IGRAPHICS_SKIA
+ 2320 #include "IGraphicsSkia.cpp"
+
+
+
+ 2324 #elif defined IGRAPHICS_NANOVG
+ 2325 #include "IGraphicsNanoVG.cpp"
+ 2326 #ifdef IGRAPHICS_FREETYPE
+ 2327 #define FONS_USE_FREETYPE
+ 2328 #pragma comment(lib, "freetype.lib" )
+
+
+
+
+
+
+
Common paths useful for plug-ins.
const void * LoadWinResource(const char *resID, const char *type, int &sizeInBytes, void *pHInstance)
Load a resource from the binary (windows only).
EResourceLocation LocateResource(const char *fileNameOrResID, const char *type, WDL_String &result, const char *bundleID, void *pHInstance, const char *sharedResourcesSubPath)
Find the absolute path of a resource based on it's file name (e.g.
+
+
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
virtual ECursor SetMouseCursor(ECursor cursorType=ECursor::ARROW)
Sets the mouse cursor to one of ECursor (implementations should return the result of the base impleme...
-
+
IGraphics platform class for Windows.
EParamType Type() const
Get the parameter's type.
@@ -2413,7 +2440,7 @@
static const char * TextStyleString(ETextStyle style)
Helper to get a CString based on ETextStyle.
Used to group mouse coordinates with mouse modifier information.
Used to manage color data, independent of draw class/platform.
-
+
Used for key press info, such as ASCII representation, virtual key (mapped to win32 codes) and modifi...
Used to manage mouse modifiers i.e.
Used to manage a rectangular area, independent of draw class/platform.
diff --git a/_i_graphics_win_8h_source.html b/_i_graphics_win_8h_source.html
index 9f761b28..4a868361 100644
--- a/_i_graphics_win_8h_source.html
+++ b/_i_graphics_win_8h_source.html
@@ -162,109 +162,111 @@
77 bool SetTextInClipboard(
const char * str)
override ;
78 bool SetFilePathInClipboard(
const char * path)
override ;
- 80 bool PlatformSupportsMultiTouch()
const override ;
+ 80 bool InitiateExternalFileDragDrop(
const char * path,
const IRECT & iconBounds)
override ;
- 82 static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
- 83 static LRESULT CALLBACK ParamEditProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
- 84 static BOOL CALLBACK FindMainWindow(HWND hWnd, LPARAM lParam);
-
-
+ 82 bool PlatformSupportsMultiTouch()
const override ;
+
+ 84 static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ 85 static LRESULT CALLBACK ParamEditProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ 86 static BOOL CALLBACK FindMainWindow(HWND hWnd, LPARAM lParam);
-
-
- 90 void CreatePlatformTextEntry(
int paramIdx,
const IText & text,
const IRECT & bounds,
int length,
const char * str)
override ;
-
- 92 void SetTooltip(
const char * tooltip);
-
-
-
-
- 97 IRECT GetWindowRECT();
-
-
+
+
+
+
+ 92 void CreatePlatformTextEntry(
int paramIdx,
const IText & text,
const IRECT & bounds,
int length,
const char * str)
override ;
+
+ 94 void SetTooltip(
const char * tooltip);
+
+
+
+
+ 99 IRECT GetWindowRECT();
- 103 void OnDisplayTimer(
int vBlankCount = 0);
-
-
-
-
-
-
-
-
-
-
- 114 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fileNameOrResID)
override ;
- 115 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fontName, ETextStyle style)
override ;
- 116 PlatformFontPtr LoadPlatformFont(
const char * fontID,
void * pData,
int dataSize)
override ;
- 117 void CachePlatformFont(
const char * fontID,
const PlatformFontPtr& font)
override ;
-
- 119 inline IMouseInfo GetMouseInfo(LPARAM lParam, WPARAM wParam);
- 120 inline IMouseInfo GetMouseInfoDeltas(
float & dX,
float & dY, LPARAM lParam, WPARAM wParam);
- 121 bool MouseCursorIsLocked();
-
-
- 124 void CreateGLContext();
- 125 void DestroyGLContext();
- 126 void ActivateGLContext()
override ;
- 127 void DeactivateGLContext()
override ;
- 128 HGLRC mHGLRC =
nullptr ;
- 129 HGLRC mStartHGLRC =
nullptr ;
- 130 HDC mStartHDC =
nullptr ;
-
-
- 133 HINSTANCE mHInstance =
nullptr ;
- 134 HWND mPlugWnd =
nullptr ;
- 135 HWND mParamEditWnd =
nullptr ;
- 136 HWND mTooltipWnd =
nullptr ;
- 137 HWND mParentWnd =
nullptr ;
- 138 HWND mMainWnd =
nullptr ;
- 139 WNDPROC mDefEditProc =
nullptr ;
- 140 HFONT mEditFont =
nullptr ;
-
-
- 143 void StartVBlankThread(HWND hWnd);
- 144 void StopVBlankThread();
-
-
- 147 HWND mVBlankWindow = 0;
- 148 volatile bool mVBlankShutdown =
false ;
- 149 HANDLE mVBlankThread = INVALID_HANDLE_VALUE;
- 150 volatile DWORD mVBlankCount = 0;
- 151 int mVBlankSkipUntil = 0;
- 152 bool mVSYNCEnabled =
false ;
-
- 154 const IParam * mEditParam =
nullptr ;
-
-
-
- 158 EParamEditMsg mParamEditMsg = kNone;
- 159 bool mShowingTooltip =
false ;
- 160 float mHiddenCursorX = 0.f;
- 161 float mHiddenCursorY = 0.f;
- 162 int mTooltipIdx = -1;
-
- 164 WDL_String mMainWndClassName;
-
- 166 static StaticStorage<InstalledFont> sPlatformFontCache;
- 167 static StaticStorage<HFontHolder> sHFontCache;
-
- 169 std::unordered_map<ITouchID, IMouseInfo> mDeltaCapture;
-
-
- 172 END_IGRAPHICS_NAMESPACE
-
-
-
+
+
+ 105 void OnDisplayTimer(
int vBlankCount = 0);
+
+
+
+
+
+
+
+
+
+
+ 116 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fileNameOrResID)
override ;
+ 117 PlatformFontPtr LoadPlatformFont(
const char * fontID,
const char * fontName, ETextStyle style)
override ;
+ 118 PlatformFontPtr LoadPlatformFont(
const char * fontID,
void * pData,
int dataSize)
override ;
+ 119 void CachePlatformFont(
const char * fontID,
const PlatformFontPtr& font)
override ;
+
+ 121 inline IMouseInfo GetMouseInfo(LPARAM lParam, WPARAM wParam);
+ 122 inline IMouseInfo GetMouseInfoDeltas(
float & dX,
float & dY, LPARAM lParam, WPARAM wParam);
+ 123 bool MouseCursorIsLocked();
+
+
+ 126 void CreateGLContext();
+ 127 void DestroyGLContext();
+ 128 void ActivateGLContext()
override ;
+ 129 void DeactivateGLContext()
override ;
+ 130 HGLRC mHGLRC =
nullptr ;
+ 131 HGLRC mStartHGLRC =
nullptr ;
+ 132 HDC mStartHDC =
nullptr ;
+
+
+ 135 HINSTANCE mHInstance =
nullptr ;
+ 136 HWND mPlugWnd =
nullptr ;
+ 137 HWND mParamEditWnd =
nullptr ;
+ 138 HWND mTooltipWnd =
nullptr ;
+ 139 HWND mParentWnd =
nullptr ;
+ 140 HWND mMainWnd =
nullptr ;
+ 141 WNDPROC mDefEditProc =
nullptr ;
+ 142 HFONT mEditFont =
nullptr ;
+
+
+ 145 void StartVBlankThread(HWND hWnd);
+ 146 void StopVBlankThread();
+
+
+ 149 HWND mVBlankWindow = 0;
+ 150 volatile bool mVBlankShutdown =
false ;
+ 151 HANDLE mVBlankThread = INVALID_HANDLE_VALUE;
+ 152 volatile DWORD mVBlankCount = 0;
+ 153 int mVBlankSkipUntil = 0;
+ 154 bool mVSYNCEnabled =
false ;
+
+ 156 const IParam * mEditParam =
nullptr ;
+
+
+
+ 160 EParamEditMsg mParamEditMsg = kNone;
+ 161 bool mShowingTooltip =
false ;
+ 162 float mHiddenCursorX = 0.f;
+ 163 float mHiddenCursorY = 0.f;
+ 164 int mTooltipIdx = -1;
+
+ 166 WDL_String mMainWndClassName;
+
+ 168 static StaticStorage<InstalledFont> sPlatformFontCache;
+ 169 static StaticStorage<HFontHolder> sHFontCache;
+
+ 171 std::unordered_map<ITouchID, IMouseInfo> mDeltaCapture;
+
+
+ 174 END_IGRAPHICS_NAMESPACE
+
+
+
Used for choosing a drawing backend.
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
-
+
IGraphics platform class for Windows.
Used to group mouse coordinates with mouse modifier information.
Used to manage color data, independent of draw class/platform.
-
+
Used to manage a rectangular area, independent of draw class/platform.
IText is used to manage font and text/text entry style for a piece of text on the UI,...
diff --git a/_i_graphics_win__dnd_8h_source.html b/_i_graphics_win__dnd_8h_source.html
new file mode 100644
index 00000000..c8f97bf5
--- /dev/null
+++ b/_i_graphics_win__dnd_8h_source.html
@@ -0,0 +1,411 @@
+
+
+
+
+
+
+
+
+iPlug 2: IGraphicsWin_dnd.h Source File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iPlug2 - C++ Audio Plug-in Framework
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
16 BEGIN_IGRAPHICS_NAMESPACE
+
+
18 namespace DragAndDropHelpers
+
+
+
+
+
+
+
+
26 assert(mRefCount == 0);
+
+
+
29 HRESULT STDMETHODCALLTYPE QueryInterface(REFIID refiid,
void ** resultHandle)
override
+
+
31 if (refiid == IID_IDropSource)
+
+
+
+
+
+
37 *resultHandle =
nullptr ;
+
+
+
+
41 ULONG STDMETHODCALLTYPE AddRef ()
override {
return ++mRefCount; }
+
42 ULONG STDMETHODCALLTYPE Release()
override
+
+
44 int refCount = --mRefCount;
+
45 assert(refCount >= 0);
+
+
+
+
+
+
+
+
+
54 HRESULT STDMETHODCALLTYPE QueryContinueDrag(BOOL escapeKeyPressed, DWORD grfKeyState)
override
+
+
56 if (escapeKeyPressed == TRUE)
+
+
58 DBGMSG(
"DropSource: escapeKeyPressed, abort dnd\n" );
+
59 return DRAGDROP_S_CANCEL;
+
+
+
62 if ((grfKeyState & MK_LBUTTON) == 0)
+
+
64 return DRAGDROP_S_DROP;
+
+
+
+
+
69 HRESULT STDMETHODCALLTYPE GiveFeedback(DWORD )
override
+
+
71 return DRAGDROP_S_USEDEFAULTCURSORS;
+
+
+
+
+
+
77 static void deepFormatCopy(FORMATETC& dest,
const FORMATETC& source)
+
+
+
80 if (source.ptd !=
nullptr )
+
+
82 dest.ptd = (DVTARGETDEVICE*) CoTaskMemAlloc (
sizeof (DVTARGETDEVICE));
+
83 if (dest.ptd !=
nullptr )
+
+
85 *(dest.ptd) = *(source.ptd);
+
+
+
+
+
+
+
+
+
+
+
96 ULONG STDMETHODCALLTYPE AddRef(
void ) {
return ++mRefCount; }
+
97 ULONG STDMETHODCALLTYPE Release(
void )
+
+
99 int refCount = --mRefCount;
+
100 assert(refCount >= 0);
+
+
+
+
+
+
+
107 HRESULT STDMETHODCALLTYPE QueryInterface(REFIID refiid,
void **resultHandle)
+
+
109 if (refiid == IID_IEnumFORMATETC)
+
+
+
112 *resultHandle =
this ;
+
+
+
115 *resultHandle =
nullptr ;
+
116 return E_NOINTERFACE;
+
+
+
119 HRESULT Clone (IEnumFORMATETC** resultHandle)
override
+
+
121 if (resultHandle ==
nullptr )
+
+
+
+
+
126 copyObj->mCounter = mCounter;
+
127 *resultHandle = copyObj;
+
+
+
+
131 HRESULT Next (ULONG celt, FORMATETC *pFormat, ULONG* pceltFetched)
override
+
+
133 if (pceltFetched !=
nullptr )
+
+
+
+
+
+
+
+
+
142 if (mCounter == 0 && celt > 0 && pFormat !=
nullptr )
+
+
144 deepFormatCopy(pFormat[0], *mFormatPtr);
+
+
146 if (pceltFetched !=
nullptr )
+
+
+
+
+
+
+
+
+
155 HRESULT Skip (ULONG celt)
override
+
+
157 if (mCounter + (
int ) celt >= 1)
+
+
+
+
161 mCounter += (int) celt;
+
+
+
+
165 HRESULT Reset()
override
+
+
+
+
+
+
+
+
173 const FORMATETC*
const mFormatPtr;
+
+
+
+
+
+
+
+
181 DataObject (
const FORMATETC* f,
const char *filePath) : mFormatPtr (f)
+
+
183 mFilePath = filePath;
+
+
+
+
+
188 assert(mRefCount == 0);
+
+
+
191 HRESULT STDMETHODCALLTYPE QueryInterface(REFIID refiid,
void **resultHandle)
+
+
193 if (refiid == IID_IDataObject || refiid == IID_IUnknown)
+
+
+
+
+
+
199 *resultHandle = NULL;
+
200 return E_NOINTERFACE;
+
+
+
203 ULONG STDMETHODCALLTYPE AddRef() {
return ++mRefCount; }
+
204 ULONG STDMETHODCALLTYPE Release()
+
+
206 int refCount = --mRefCount;
+
207 assert(mRefCount>=0);
+
+
+
+
+
+
+
+
215 bool acceptFormat(FORMATETC *f)
+
+
217 return (f->dwAspect & DVASPECT_CONTENT) && (f->tymed & TYMED_HGLOBAL) && (f->cfFormat == CF_HDROP);
+
+
+
220 HRESULT STDMETHODCALLTYPE GetData(FORMATETC *pFormat, STGMEDIUM *pMedium)
+
+
222 if (pFormat ==
nullptr )
+
+
+
+
+
227 if (acceptFormat(pFormat) ==
false )
+
+
229 return DV_E_FORMATETC;
+
+
+
232 UTF8AsUTF16 pathWide(mFilePath.c_str());
+
+
234 HDROP hGlobal = (HDROP)GlobalAlloc(GHND,
sizeof (DROPFILES) + (
sizeof (wchar_t) * (pathWide.GetLength() + 2)));
+
+
+
+
238 DBGMSG(
"DataObject::GetData ERROR: GlobalAlloc returned null, aborting.\n" );
+
+
+
+
242 DROPFILES* pDropFiles = (DROPFILES*) GlobalLock(hGlobal);
+
+
+
245 DBGMSG(
"DataObject::GetData ERROR: GlobalLock returned null, aborting.\n" );
+
+
+
+
249 pDropFiles->pFiles =
sizeof (DROPFILES);
+
250 pDropFiles->fWide =
true ;
+
251 std::copy_n(pathWide.Get(), pathWide.GetLength(),
reinterpret_cast< wchar_t *
> (&pDropFiles[1]));
+
+
+
254 pMedium->tymed = TYMED_HGLOBAL;
+
255 pMedium->hGlobal = hGlobal;
+
256 pMedium->pUnkForRelease =
nullptr ;
+
+
258 GlobalUnlock(hGlobal);
+
+
+
+
+
263 HRESULT STDMETHODCALLTYPE QueryGetData( FORMATETC *pFormat )
+
+
265 if (pFormat ==
nullptr )
+
+
+
+
+
270 if (acceptFormat(pFormat) ==
false )
+
+
272 return DV_E_FORMATETC;
+
+
+
+
+
+
278 HRESULT GetCanonicalFormatEtc(FORMATETC*, FORMATETC* pFormatOut)
override
+
+
280 pFormatOut->ptd =
nullptr ;
+
+
+
+
284 HRESULT EnumFormatEtc(DWORD direction, IEnumFORMATETC** resultHandle)
override
+
+
+
+
+
+
290 if (direction == DATADIR_GET)
+
+
+
+
+
295 *resultHandle =
nullptr ;
+
+
+
+
+
300 HRESULT STDMETHODCALLTYPE GetDataHere(FORMATETC*, STGMEDIUM*) {
return E_NOTIMPL; }
+
301 HRESULT STDMETHODCALLTYPE SetData(FORMATETC*, STGMEDIUM*, BOOL) {
return E_NOTIMPL; }
+
302 HRESULT STDMETHODCALLTYPE DAdvise(FORMATETC*, DWORD, IAdviseSink*, DWORD*) {
return E_NOTIMPL; }
+
303 HRESULT STDMETHODCALLTYPE DUnadvise(DWORD) {
return E_NOTIMPL; }
+
304 HRESULT STDMETHODCALLTYPE EnumDAdvise(IEnumSTATDATA**) {
return E_NOTIMPL; }
+
+
+
307 std::string mFilePath;
+
308 const FORMATETC*
const mFormatPtr;
+
+
+
+
312 END_IGRAPHICS_NAMESPACE
+
+
IPlug logging a.k.a tracing functionality.
+
+
+
+
+
+
+
+
diff --git a/_i_platform_view_control_8h_source.html b/_i_platform_view_control_8h_source.html
index 2ef9aef3..a72b6c4d 100644
--- a/_i_platform_view_control_8h_source.html
+++ b/_i_platform_view_control_8h_source.html
@@ -188,7 +188,7 @@
virtual void AttachPlatformView(const IRECT &r, void *pView)
Add an OS view as a sub-view, on top of the IGraphics view.
virtual void HidePlatformView(void *pView, bool hide)
Hide a previously attached platform view from the IGraphics view.
virtual void RemovePlatformView(void *pView)
Remove a previously attached platform view from the IGraphics view.
-float GetDrawScale() const
Gets the graphics context scaling factor.
+float GetDrawScale() const
Gets the graphics context scaling factor.
diff --git a/_i_plug_a_p_p__dialog_8cpp_source.html b/_i_plug_a_p_p__dialog_8cpp_source.html
index 1a3dcb84..769ee1a2 100644
--- a/_i_plug_a_p_p__dialog_8cpp_source.html
+++ b/_i_plug_a_p_p__dialog_8cpp_source.html
@@ -883,14 +883,14 @@
An editor delegate base class for a SOMETHING that uses IGraphics for it's UI.
IGraphics * GetUI()
Get a pointer to the IGraphics context.
The lowest level base class of an IGraphics context.
-void ShowControlBounds(bool enable)
+void ShowControlBounds(bool enable)
void EnableLiveEdit(bool enable)
Live edit mode allows you to relocate controls at runtime in debug builds.
-bool ShowAreaDrawnEnabled() const
-bool LiveEditEnabled() const
-bool ShowControlBoundsEnabled() const
+bool ShowAreaDrawnEnabled() const
+bool LiveEditEnabled() const
+bool ShowControlBoundsEnabled() const
void ShowFPSDisplay(bool enable)
Shows a control to display the frame rate of drawing.
-
-void ShowAreaDrawn(bool enable)
+
+void ShowAreaDrawn(bool enable)
void SetScreenScale(float scale)
Called by the platform IGraphics class when moving to a new screen to set DPI.
A class that hosts an IPlug as a standalone app and provides Audio/Midi I/O.
void ProbeAudioIO()
find out which devices have input channels & which have output channels, add their ids to the lists
diff --git a/_i_popup_menu_control_8cpp_source.html b/_i_popup_menu_control_8cpp_source.html
index 034ef13e..394d0eac 100644
--- a/_i_popup_menu_control_8cpp_source.html
+++ b/_i_popup_menu_control_8cpp_source.html
@@ -1116,7 +1116,7 @@
virtual void UpdateTooltips()=0
Call this if you modify control tool tips at runtime.
virtual void FillRoundRect(const IColor &color, const IRECT &bounds, float cornerRadius=5.f, const IBlend *pBlend=0)
Fill a rounded rectangle with a color.
virtual void FillTriangle(const IColor &color, float x1, float y1, float x2, float y2, float x3, float y3, const IBlend *pBlend=0)
Fill a triangle with a color.
-IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
+IRECT GetBounds() const
Returns an IRECT that represents the entire UI bounds This is useful for programatically arranging UI...
virtual float MeasureText(const IText &text, const char *str, IRECT &bounds) const
Measure the rectangular region that some text will occupy.
diff --git a/_i_text_entry_control_8cpp_source.html b/_i_text_entry_control_8cpp_source.html
index ecfc4e24..f13f38ad 100644
--- a/_i_text_entry_control_8cpp_source.html
+++ b/_i_text_entry_control_8cpp_source.html
@@ -656,12 +656,12 @@
The lowest level base class of an IGraphics context.
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.
void CreatePopupMenu(IControl &control, IPopupMenu &menu, const IRECT &bounds, int valIdx=0)
Shows a pop up/contextual menu in relation to a rectangular region of the graphics context.
-void ClearInTextEntryControl()
Called when the text entry is dismissed, to reset mInTextEntry.
+void ClearInTextEntryControl()
Called when the text entry is dismissed, to reset mInTextEntry.
virtual bool SetTextInClipboard(const char *str)=0
Set text in the clipboard.
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
void SetControlValueAfterTextEdit(const char *str)
Called by the platform class after returning from a text entry in order to update a control with a ne...
void SetAllControlsDirty()
Calls SetDirty() on every control.
-IControl * GetControlInTextEntry()
+IControl * GetControlInTextEntry()
virtual float MeasureText(const IText &text, const char *str, IRECT &bounds) const
Measure the rectangular region that some text will occupy.
EParamType Type() const
Get the parameter's type.
diff --git a/_i_v_tabbed_pages_control_8h_source.html b/_i_v_tabbed_pages_control_8h_source.html
index 5757c3fa..ae8d7102 100644
--- a/_i_v_tabbed_pages_control_8h_source.html
+++ b/_i_v_tabbed_pages_control_8h_source.html
@@ -342,7 +342,7 @@
void SetTargetAndDrawRECTs(const IRECT &bounds)
Set BOTH the draw rect and the target area, within the graphics context for this control.
The lowest level base class of an IGraphics context.
virtual void DrawRoundRect(const IColor &color, const IRECT &bounds, float cornerRadius=5.f, const IBlend *pBlend=0, float thickness=1.f)
Draw a rounded rectangle to the graphics context.
-IBubbleControl * GetBubbleControl(int i=0)
+IBubbleControl * GetBubbleControl(int i=0)
virtual void FillRoundRect(const IColor &color, const IRECT &bounds, float cornerRadius=5.f, const IBlend *pBlend=0)
Fill a rounded rectangle with a color.
A control used as the base class for a tabbed page of subcontrols.
void OnStyleChanged() override
Implement if extra changes are required in response to style changing.
diff --git a/_i_web_view_control_8h_source.html b/_i_web_view_control_8h_source.html
index 894a5772..39531647 100644
--- a/_i_web_view_control_8h_source.html
+++ b/_i_web_view_control_8h_source.html
@@ -191,7 +191,7 @@
virtual void AttachPlatformView(const IRECT &r, void *pView)
Add an OS view as a sub-view, on top of the IGraphics view.
virtual void HidePlatformView(void *pView, bool hide)
Hide a previously attached platform view from the IGraphics view.
virtual void RemovePlatformView(void *pView)
Remove a previously attached platform view from the IGraphics view.
-float GetDrawScale() const
Gets the graphics context scaling factor.
+float GetDrawScale() const
Gets the graphics context scaling factor.
A control that allows the embedding of HTML UI inside an IGraphics context using a platform-native we...
void OnRescale() override
Implement to do something when graphics is scaled globally (e.g.
void OnResize() override
Called when IControl is constructed or resized using SetRect().
diff --git a/_test_custom_shader_control_8h_source.html b/_test_custom_shader_control_8h_source.html
index 9da61e18..a5496ffc 100644
--- a/_test_custom_shader_control_8h_source.html
+++ b/_test_custom_shader_control_8h_source.html
@@ -303,11 +303,11 @@
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.
virtual void * GetDrawContext()=0
Gets a void pointer to underlying drawing context, for the IGraphics backend See draw class implement...
virtual void DrawDottedRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f, float dashLen=2.f)
Draw a dotted rectangle to the graphics context.
-int WindowWidth() const
Gets the width of the graphics context including draw scaling.
+int WindowWidth() const
Gets the width of the graphics context including draw scaling.
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
-float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
-float GetDrawScale() const
Gets the graphics context scaling factor.
-int WindowHeight() const
Gets the height of the graphics context including draw scaling.
+float GetScreenScale() const
Gets the screen/display scaling factor, e.g.
+float GetDrawScale() const
Gets the graphics context scaling factor.
+int WindowHeight() const
Gets the height of the graphics context including draw scaling.
A base class for knob/dial controls, to handle mouse action and Sender.
Control to test IGraphicsNanoVG with Metal Shaders.
void Draw(IGraphics &g) override
Draw the control to the graphics context.
diff --git a/_test_custom_shader_control_8mm_source.html b/_test_custom_shader_control_8mm_source.html
index dfb54e11..ed56f340 100644
--- a/_test_custom_shader_control_8mm_source.html
+++ b/_test_custom_shader_control_8mm_source.html
@@ -218,7 +218,7 @@
bool mMouseIsOver
if mGraphics::mHandleMouseOver = true, this will be true when the mouse is over control.
The lowest level base class of an IGraphics context.
virtual void DrawFittedBitmap(const IBitmap &bitmap, const IRECT &bounds, const IBlend *pBlend=0)
Draw a bitmap (raster) image to the graphics context, scaling the image to fit the bounds.
-float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
+float GetTotalScale() const
Gets the combined draw and screen/display scaling factor.
virtual void * GetDrawContext()=0
Gets a void pointer to underlying drawing context, for the IGraphics backend See draw class implement...
virtual void DrawDottedRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0, float thickness=1.f, float dashLen=2.f)
Draw a dotted rectangle to the graphics context.
virtual void FillRect(const IColor &color, const IRECT &bounds, const IBlend *pBlend=0)
Fill a rectangular region of the graphics context with a color.
diff --git a/_test_multi_touch_control_8h_source.html b/_test_multi_touch_control_8h_source.html
index 7014f0aa..10a5ea85 100644
--- a/_test_multi_touch_control_8h_source.html
+++ b/_test_multi_touch_control_8h_source.html
@@ -200,7 +200,7 @@
void ResumeLayer(ILayerPtr &layer)
If a layer already exists, continue drawing to it.
bool CheckLayer(const ILayerPtr &layer)
Test to see if a layer needs drawing, for instance if the control's bounds were changed.
void DrawLayer(const ILayerPtr &layer, const IBlend *pBlend=nullptr)
Draw a layer to the main IGraphics context.
-void GetTouches(IControl *pControl, std::vector< ITouchID > &touchesOnThisControl) const
Populate a vector with the touchIDs active on pControl.
+void GetTouches(IControl *pControl, std::vector< ITouchID > &touchesOnThisControl) const
Populate a vector with the touchIDs active on pControl.
void StartLayer(IControl *pOwner, const IRECT &r, bool cacheable=false)
Create an IGraphics layer.
ILayerPtr EndLayer()
End an IGraphics layer.
A base class for controls that can do do multitouch.
diff --git a/annotated.html b/annotated.html
index 509f5721..d42d4870 100644
--- a/annotated.html
+++ b/annotated.html
@@ -83,215 +83,219 @@
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 1 2 ]
- C APIBitmap A base class interface for a bitmap abstraction around the different drawing back end bitmap representations
- C GFXLabelControl Control to display the graphics backend
- C IAboutBoxControl A "meta control" which you can attach child controls to display an about box, or preferences panel When you attach the control to the IGraphics context, it should be added last so it sits on top of other controls, and set hidden
- C IBButtonControl A bitmap button/momentary switch control
- C IBitmap User-facing bitmap abstraction that you use to manage bitmap data, independant of draw class/platform
- C IBitmapBase A base interface to be combined with IControl for bitmap-based controls "IBControls", managing an IBitmap
- C IBitmapControl A basic control to draw a bitmap, or one frame of a stacked bitmap depending on the current value
- C IBKnobControl A bitmap knob/dial control that draws a frame from a stacked bitmap
- C IBKnobRotaterControl A bitmap knob/dial control that rotates an image
- C IBlend Used to manage composite/blend operations, independent of draw class/platform
- C IBMeterControl A bitmap meter control, that can be used for VUMeters
- C IBSliderControl A bitmap slider/fader control
- C IBSwitchControl A bitmap switch control
- C IBTextControl A control to display text using a monospace bitmap font
- C IBubbleControl A special control to draw contextual info as a slider etc is moved If used in the main IControl stack, you probably want it to be the very last control that is added, so that it gets drawn on top
- C IBufferSender IBufferSender is a utility class which can be used to defer buffer data for sending to the GUI
- C IBusInfo Used to manage information about a bus such as whether it's an input or output, channel count
- C IButtonControlBase A base class for buttons/momentary switches - cannot be linked to parameters
- C IByteChunk Manages a block of memory, for plug-in settings store/recall
- C IByteChunkReader Helper class to maintain a read position whilst extracting data from an IByteChunk
+ ► N DragAndDropHelpers
+ C DataObject
+ C DropSource
+ C EnumFORMATETC
+ C APIBitmap A base class interface for a bitmap abstraction around the different drawing back end bitmap representations
+ C GFXLabelControl Control to display the graphics backend
+ C IAboutBoxControl A "meta control" which you can attach child controls to display an about box, or preferences panel When you attach the control to the IGraphics context, it should be added last so it sits on top of other controls, and set hidden
+ C IBButtonControl A bitmap button/momentary switch control
+ C IBitmap User-facing bitmap abstraction that you use to manage bitmap data, independant of draw class/platform
+ C IBitmapBase A base interface to be combined with IControl for bitmap-based controls "IBControls", managing an IBitmap
+ C IBitmapControl A basic control to draw a bitmap, or one frame of a stacked bitmap depending on the current value
+ C IBKnobControl A bitmap knob/dial control that draws a frame from a stacked bitmap
+ C IBKnobRotaterControl A bitmap knob/dial control that rotates an image
+ C IBlend Used to manage composite/blend operations, independent of draw class/platform
+ C IBMeterControl A bitmap meter control, that can be used for VUMeters
+ C IBSliderControl A bitmap slider/fader control
+ C IBSwitchControl A bitmap switch control
+ C IBTextControl A control to display text using a monospace bitmap font
+ C IBubbleControl A special control to draw contextual info as a slider etc is moved If used in the main IControl stack, you probably want it to be the very last control that is added, so that it gets drawn on top
+ C IBufferSender IBufferSender is a utility class which can be used to defer buffer data for sending to the GUI
+ C IBusInfo Used to manage information about a bus such as whether it's an input or output, channel count
+ C IButtonControlBase A base class for buttons/momentary switches - cannot be linked to parameters
+ C IByteChunk Manages a block of memory, for plug-in settings store/recall
+ C IByteChunkReader Helper class to maintain a read position whilst extracting data from an IByteChunk
- C IByteGetter A helper class for IByteChunk and IByteStream that avoids code duplication
- C IByteStream Manages a non-owned block of memory, for receiving arbitrary message byte streams
- C ICaptionControl A control to display the textual representation of a parameter
- C IChannelData Used to manage scratch buffers for each channel of I/O, which may involve converting from single to double precision
- C IColor Used to manage color data, independent of draw class/platform
- C IColorPickerControl A control for choosing a color
- C IColorStop Used to represent a point/stop in a gradient
- C IContainerBase IContainerBase allows a control to nest sub controls and it clips the drawing of those subcontrols Inheritors can add child controls by overriding OnAttached() and calling AddChildControl(), or passing in an AttachFunc lambda to the construtor
- C IControl The lowest level base class of an IGraphics control
- C ICornerResizerControl A control for resizing the plug-in window by clicking and dragging in the bottom right-hand corner This can be added with IGraphics::AttachCornerResizer()
- C IDirBrowseControlBase An abstract IControl base class that you can inherit from in order to make a control that pops up a menu to browse files Optionally with a specific extension
- C IEditableTextControl A basic control to display some editable text
- C IEditorDelegate This pure virtual interface delegates communication in both directions between a UI editor and something else (which is usually a plug-in) It is also the class that owns parameter objects (for historical reasons) - although it's not necessary to allocate them
- C IFillOptions Used to manage fill behaviour
- C IFlexBox IFlexBox is a basic C++ helper for Yoga https://yogalayout.com
- C IFPSDisplayControl Performance display meter, based on code from NanoVG This is a special control that lives outside the main IGraphics control stack
- C IGEditorDelegate An editor delegate base class for a SOMETHING that uses IGraphics for it's UI
- C IGestureInfo Used to describe a particular gesture
- C IGraphics The lowest level base class of an IGraphics context
- ► C IGraphicsCanvas IGraphics draw class HTML5 canvas
- C Bitmap
- C IGraphicsIOS IGraphics platform class for IOS
- C IGraphicsLinux IGraphics platform class for linux
- C IGraphicsLiveEdit A control to enable live modification of control layout in an IGraphics context in debug builds This is based on the work of Youlean, who first included it in iPlug-Youlean The lives outside the main IGraphics control stack and it can be added with IGraphics::EnableLiveEdit()
- C IGraphicsMac IGraphics platform class for macOS
- ► C IGraphicsNanoVG IGraphics draw class using NanoVG
+ C IByteGetter A helper class for IByteChunk and IByteStream that avoids code duplication
+ C IByteStream Manages a non-owned block of memory, for receiving arbitrary message byte streams
+ C ICaptionControl A control to display the textual representation of a parameter
+ C IChannelData Used to manage scratch buffers for each channel of I/O, which may involve converting from single to double precision
+ C IColor Used to manage color data, independent of draw class/platform
+ C IColorPickerControl A control for choosing a color
+ C IColorStop Used to represent a point/stop in a gradient
+ C IContainerBase IContainerBase allows a control to nest sub controls and it clips the drawing of those subcontrols Inheritors can add child controls by overriding OnAttached() and calling AddChildControl(), or passing in an AttachFunc lambda to the construtor
+ C IControl The lowest level base class of an IGraphics control
+ C ICornerResizerControl A control for resizing the plug-in window by clicking and dragging in the bottom right-hand corner This can be added with IGraphics::AttachCornerResizer()
+ C IDirBrowseControlBase An abstract IControl base class that you can inherit from in order to make a control that pops up a menu to browse files Optionally with a specific extension
+ C IEditableTextControl A basic control to display some editable text
+ C IEditorDelegate This pure virtual interface delegates communication in both directions between a UI editor and something else (which is usually a plug-in) It is also the class that owns parameter objects (for historical reasons) - although it's not necessary to allocate them
+ C IFillOptions Used to manage fill behaviour
+ C IFlexBox IFlexBox is a basic C++ helper for Yoga https://yogalayout.com
+ C IFPSDisplayControl Performance display meter, based on code from NanoVG This is a special control that lives outside the main IGraphics control stack
+ C IGEditorDelegate An editor delegate base class for a SOMETHING that uses IGraphics for it's UI
+ C IGestureInfo Used to describe a particular gesture
+ C IGraphics The lowest level base class of an IGraphics context
+ ► C IGraphicsCanvas IGraphics draw class HTML5 canvas
+ C Bitmap
+ C IGraphicsIOS IGraphics platform class for IOS
+ C IGraphicsLinux IGraphics platform class for linux
+ C IGraphicsLiveEdit A control to enable live modification of control layout in an IGraphics context in debug builds This is based on the work of Youlean, who first included it in iPlug-Youlean The lives outside the main IGraphics control stack and it can be added with IGraphics::EnableLiveEdit()
+ C IGraphicsMac IGraphics platform class for macOS
+ ► C IGraphicsNanoVG IGraphics draw class using NanoVG
- C Bitmap
- ► C IGraphicsSkia IGraphics draw class using Skia
- C Bitmap
- ► C IGraphicsWeb IGraphics platform class for the web
- C FileFont
- C MemoryFont
- ► C IGraphicsWin IGraphics platform class for Windows
- C HFontHolder
- C InstalledFont
- C IKeyPress Used for key press info, such as ASCII representation, virtual key (mapped to win32 codes) and modifiers
- C IKnobControlBase A base class for knob/dial controls, to handle mouse action and Sender
- C ILambdaControl A control that can be specialised with a lambda function, for quick experiments without making a custom IControl
- C ILayer An abstraction that is used to store a temporary raster image/framebuffer
- C ILEDControl Glowing LED control
- C IMatrix Used to store transformation matrices
- C IMidiMsg Encapsulates a MIDI message and provides helper functions
- C IMidiQueue A class to help with queuing timestamped MIDI messages
- C IMouseInfo Used to group mouse coordinates with mouse modifier information
- C IMouseMod Used to manage mouse modifiers i.e
- C IMultiLineTextControl A basic control to display some text that needs to span multiple lines
- ► C IMultiTouchControlBase A base class for controls that can do do multitouch
- C TrackedTouch
- C IOConfig An IOConfig is used to store bus info for each input/output configuration defined in the channel io string
- C IPanelControl A basic control to fill a rectangle with a color or gradient
- ► C IParam IPlug's parameter class
- C Shape Base struct for parameter shaping
- C ShapeExp Exponential parameter shaping
- C ShapeLinear Linear parameter shaping
- C ShapePowCurve PowCurve parameter shaping
- C IPattern Used to store pattern information for gradients
- ► C IPeakAvgSender IPeakAvgSender is a utility class which can be used to defer peak & avg/RMS data from sample buffers for sending to the GUI It also features an envelope follower to control meter ballistics
- C EnvelopeFollower
- C IPeakSender IPeakSender is a utility class which can be used to defer peak data from sample buffers for sending to the GUI It sends the average peak value over a certain time window
- C IPlatformViewControl A control that let's you embed a HWND, UIView or NSView inside an IGraphics UI
- C IPLUG_AUVIEWCONTROLLER
- C IPlugAAX AAX API base class for an IPlug plug-in
- C IPlugAPIBase The base class of an IPlug plug-in, which interacts with the different plug-in APIs
- C IPlugAPP Standalone application base class for an IPlug plug-in
- ► C IPlugAPPHost A class that hosts an IPlug as a standalone app and provides Audio/Midi I/O
- C AppState Used to manage changes to app i/o
- C IPlugAU AudioUnit v2 API base class for an IPlug plug-in
- C IPlugAUFactory AudioUnit v2 Factory Class Template
- C IPlugAUv3 AudioUnit v3 API base class for an IPlug plug-in
- C IPluginBase Base class that contains plug-in info and state manipulation methods
- C IPlugProcessor The base class for IPlug Audio Processing
- C IPlugQueue A lock-free SPSC queue used to transfer data between threads based on MLQueue.h by Randy Jones based on https://kjellkod.wordpress.com/2012/11/28/c-debt-paid-in-full-wait-free-lock-free-queue/
- C IPlugReaperVST2 Reaper specific VST2.4 API base class for an IPlug plug-in
- C IPlugVST2 VST2.4 API base class for an IPlug plug-in
- C IPlugVST3 VST3 base class for a non-distributed IPlug VST3 plug-in
- C IPlugVST3BypassParameter VST3 bypass parameter helper
- C IPlugVST3Controller VST3 Controller API-base class for a distributed IPlug VST3 plug-in
- C IPlugVST3ControllerBase Shared VST3 controller code
- C IPlugVST3PresetParameter VST3 preset parameter helper
- C IPlugVST3Processor VST3 Processor API-base class for a distributed IPlug VST3 plug-in
- C IPlugVST3ProcessorBase Shared VST3 processor code
- C IPlugVST3State Shared VST3 State management code
- C IPlugWAM WebAudioModule (WAM) API base class
- C IPlugWeb This is used for the UI "editor" - controller side of a WAM or remote editors that communicate with desktop iPlug plug-ins via web sockets
- ► C IPopupMenu A class for setting the contents of a pop up menu
- C Item A class to specify an item of a pop up menu
- C IPopupMenuControl A base control for a pop-up menu/drop-down list that stays within the bounds of the IGraphics context
- C IPreset A struct used for specifying baked-in factory presets
- C IRECT Used to manage a rectangular area, independent of draw class/platform
- C IRECTList Used to manage a list of rectangular areas and optimize them for drawing to the screen
- C IRTTextControl A control to display some text in the UI, driven by values in the RT audio thread
- C ISender ISender is a utility class which can be used to defer data from the realtime audio processing and send it to the GUI for visualization
- C ISenderData ISenderData is used to represent a typed data packet, that may contain values for multiple channels
- C IShaderControl This control allows you to draw to the UI via a shader written using the Skia shading language, which is similar to GLSL
- C IShadow Used to specify properties of a drop-shadow to a layer
- C ISkLottieControl A control that hosts a Lottie animation, via Skia's Skottie module https://skia.org/user/modules/skottie
- C ISkParagraphControl A control that demonstrates how to draw rich text using SkParagraph
- C ISliderControlBase A base class for slider/fader controls, to handle mouse action and Sender
- C IStrokeOptions Used to manage stroke behaviour for path based drawing back ends
- C ISVG User-facing SVG abstraction that you use to manage SVG data ISVG doesn't actually own the image data
- C ISVGButtonControl A vector button/momentary switch control which shows an SVG image
- C ISVGControl A basic control to draw an SVG image to the screen
- C ISVGKnobControl A vector knob/dial control which rotates an SVG image
- C ISVGSliderControl A Slider control with and SVG for track and handle
- C ISVGSwitchControl A vector switch control which shows one of multiple SVG states
- C ISVGToggleControl A vector toggle switch control which shows an SVG image
- C ISwitchControlBase A base class for switch controls
- C ISysEx A struct for dealing with SysEx messages
- C 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
- C ITextControl A basic control to display some text
- C ITextEntryControl A Text entry widget drawn by IGraphics
- C ITextToggleControl A control to toggle between two text strings on click
- C ITimeInfo Encapsulates information about the host transport state
- C IURLControl A control to show a clickable URL, that changes color after clicking
- C IVBakedPresetManagerControl A "meta control" for a "preset manager" for "baked in" factory presets It adds several child buttons
- C IVButtonControl A vector button/momentary switch control
- C IVColorSpec Contains a set of 9 colors used to theme IVControls
- C IVColorSwatchControl A control to show a color swatch of up to 9 colors
- C IVDiskPresetManagerControl A "meta control" for a "preset manager" for disk-based preset files It adds several child buttons
- C IVDisplayControl A control to display a rolling graphics of historical values
- C IVec2 Encapsulate an xy point in one struct
- C IVectorBase A base interface to be combined with IControl for vectorial controls "IVControls", in order for them to share a common style If you need more flexibility, you're on your own!
- C IVGroupControl A control to draw a rectangle around a named IControl group
- C IVKeyboardControl Vectorial keyboard control
- C IVKnobControl A vector knob control drawn using graphics primitives
- C IVLabelControl A vector label control that can display text with a shadow
- ► C IVLEDMeterControl Vectorial multi-channel capable meter control with segmented LEDs, log response
- C LEDRange LED Range comprises info for a range of LED segments
- C IVMenuButtonControl A vector button that pops up a menu
- C IVMeterControl Vectorial multi-channel capable meter control, linear or log response
- C IVMultiSliderControl A vectorial multi-slider control
- C IVMultiToggleControl A vectorial multi-toggle control, could be used for a trigger in a step sequencer or tarnce gate
- C IVNumberBoxControl A "meta control" for a number box with an Inc/Dec button It adds several child buttons if buttons = true
- C IVPanelControl A panel control which can be styled with emboss etc
- C IVPeakAvgMeterControl Vectorial multi-channel capable meter control, with log response, held-peaks and filled-average/rms Requires an IPeakAvgSender
- ► C IVPlotControl A vector plot to display functions and waveforms
- C Plot Groups a plot function and color
- C IVRadioButtonControl A vector "radio buttons" switch control
- C IVRangeSliderControl A vector range slider control, with two handles
- C IVScopeControl Vectorial multi-channel capable oscilloscope control
- C IVSliderControl A vector slider control
- C IVSlideSwitchControl A switch with a slide animation when clicked
- C IVStyle A struct encapsulating a set of properties used to configure IVControls
- C IVSwitchControl A vector switch control
- C IVTabbedPagesControl A control to manage tabbed pages of sub controls Basic usage example:
- C IVTabPage A control used as the base class for a tabbed page of subcontrols
- C IVTabSwitchControl A vector "tab" multi switch control
- C IVToggleControl A vector toggle control
- C IVTrackControlBase A base class for mult-strip/track controls, such as multi-sliders, meters Track refers to the channel/strip, Step refers to cross-axis steps, e.g
- C IVXYPadControl A vector XY Pad slider control
- C IWebViewControl A control that allows the embedding of HTML UI inside an IGraphics context using a platform-native webview and bi-directional communication with that content NOTE: this control attaches a sub view on top of the IGraphics view, so it will render all content on-top The platform native webviews run in a separate process and communicate via IPC
- C IWheelControl Vectorial "wheel" control for pitchbender/modwheel
- C ParamTuple In certain cases we need to queue parameter changes for transferral between threads
- C PlaceHolder A control to use as a placeholder during development
- C ReaperAction Helper struct for registering Reaper Actions
- C ReaperExtBase Reaper extension base class interface
- C SysExData This structure is used when queueing Sysex messages
- C TestAnimationControl Control to test animation
- C TestArcControl Control to test drawing arcs
- C TestBezierControl Control to test drawing bezier curves
- C TestBlendControl Control to test blend methods
- C TestColorControl Control to colors
- C TestCursorControl Control to test changing the platform cursor
- C TestCustomShaderControl Control to test IGraphicsNanoVG with Metal Shaders
- C TestDirBrowseControl Control to test IDirBrowseControlBase
- C TestDragAndDropControl Control to test dropping single and multiple files
- C TestDrawContextControl Control to test obtaining a drawing API (NanoVG, Skia, Canvas) context and using that API within an IControl
- C TestDropShadowControl Control to test layer drop shadows
- C TestFlexBoxControl Control to test IGraphicsFlexBox
- C TestFontControl Control to test drawing fonts
- C TestGesturesControl Control to test multi gesture recognizers
- C TestGradientControl Control to test drawing gradients with path based drawing backends
- C TestImageControl Control to test drawing bitmaps
- C TestKeyboardControl Control to test keyboard input
- C TestLayerControl Control to test IGraphics layers
- C TestMaskControl Control to display the size of a region
- C TestMPSControl Control to test IGraphicsNanoVG with Metal Performance Shaders
- C TestMTControl Control to test multi touch
- C TestMultiPathControl Control to test drawing paths in path-based drawing backends
- C TestPolyControl Control to test drawing polygons
- C TestShadowGradientControl Control to test drawing shadows with gradients
- C TestSizeControl Control to display the size of a region
- C TestSVGControl Control to test drawing SVGs
- C TestTextControl Control to test drawing text
- C TestTextOrientationControl Control to test drawing text with orientation
- C TestTextSizeControl Control to test drawing text with varying size
- C Timer Base class for timer
+ C Bitmap
+ ► C IGraphicsSkia IGraphics draw class using Skia
+ C Bitmap
+ ► C IGraphicsWeb IGraphics platform class for the web
+ C FileFont
+ C MemoryFont
+ ► C IGraphicsWin IGraphics platform class for Windows
+ C HFontHolder
+ C InstalledFont
+ C IKeyPress Used for key press info, such as ASCII representation, virtual key (mapped to win32 codes) and modifiers
+ C IKnobControlBase A base class for knob/dial controls, to handle mouse action and Sender
+ C ILambdaControl A control that can be specialised with a lambda function, for quick experiments without making a custom IControl
+ C ILayer An abstraction that is used to store a temporary raster image/framebuffer
+ C ILEDControl Glowing LED control
+ C IMatrix Used to store transformation matrices
+ C IMidiMsg Encapsulates a MIDI message and provides helper functions
+ C IMidiQueue A class to help with queuing timestamped MIDI messages
+ C IMouseInfo Used to group mouse coordinates with mouse modifier information
+ C IMouseMod Used to manage mouse modifiers i.e
+ C IMultiLineTextControl A basic control to display some text that needs to span multiple lines
+ ► C IMultiTouchControlBase A base class for controls that can do do multitouch
+ C TrackedTouch
+ C IOConfig An IOConfig is used to store bus info for each input/output configuration defined in the channel io string
+ C IPanelControl A basic control to fill a rectangle with a color or gradient
+ ► C IParam IPlug's parameter class
+ C Shape Base struct for parameter shaping
+ C ShapeExp Exponential parameter shaping
+ C ShapeLinear Linear parameter shaping
+ C ShapePowCurve PowCurve parameter shaping
+ C IPattern Used to store pattern information for gradients
+ ► C IPeakAvgSender IPeakAvgSender is a utility class which can be used to defer peak & avg/RMS data from sample buffers for sending to the GUI It also features an envelope follower to control meter ballistics
+ C EnvelopeFollower
+ C IPeakSender IPeakSender is a utility class which can be used to defer peak data from sample buffers for sending to the GUI It sends the average peak value over a certain time window
+ C IPlatformViewControl A control that let's you embed a HWND, UIView or NSView inside an IGraphics UI
+ C IPLUG_AUVIEWCONTROLLER
+ C IPlugAAX AAX API base class for an IPlug plug-in
+ C IPlugAPIBase The base class of an IPlug plug-in, which interacts with the different plug-in APIs
+ C IPlugAPP Standalone application base class for an IPlug plug-in
+ ► C IPlugAPPHost A class that hosts an IPlug as a standalone app and provides Audio/Midi I/O
+ C AppState Used to manage changes to app i/o
+ C IPlugAU AudioUnit v2 API base class for an IPlug plug-in
+ C IPlugAUFactory AudioUnit v2 Factory Class Template
+ C IPlugAUv3 AudioUnit v3 API base class for an IPlug plug-in
+ C IPluginBase Base class that contains plug-in info and state manipulation methods
+ C IPlugProcessor The base class for IPlug Audio Processing
+ C IPlugQueue A lock-free SPSC queue used to transfer data between threads based on MLQueue.h by Randy Jones based on https://kjellkod.wordpress.com/2012/11/28/c-debt-paid-in-full-wait-free-lock-free-queue/
+ C IPlugReaperVST2 Reaper specific VST2.4 API base class for an IPlug plug-in
+ C IPlugVST2 VST2.4 API base class for an IPlug plug-in
+ C IPlugVST3 VST3 base class for a non-distributed IPlug VST3 plug-in
+ C IPlugVST3BypassParameter VST3 bypass parameter helper
+ C IPlugVST3Controller VST3 Controller API-base class for a distributed IPlug VST3 plug-in
+ C IPlugVST3ControllerBase Shared VST3 controller code
+ C IPlugVST3PresetParameter VST3 preset parameter helper
+ C IPlugVST3Processor VST3 Processor API-base class for a distributed IPlug VST3 plug-in
+ C IPlugVST3ProcessorBase Shared VST3 processor code
+ C IPlugVST3State Shared VST3 State management code
+ C IPlugWAM WebAudioModule (WAM) API base class
+ C IPlugWeb This is used for the UI "editor" - controller side of a WAM or remote editors that communicate with desktop iPlug plug-ins via web sockets
+ ► C IPopupMenu A class for setting the contents of a pop up menu
+ C Item A class to specify an item of a pop up menu
+ C IPopupMenuControl A base control for a pop-up menu/drop-down list that stays within the bounds of the IGraphics context
+ C IPreset A struct used for specifying baked-in factory presets
+ C IRECT Used to manage a rectangular area, independent of draw class/platform
+ C IRECTList Used to manage a list of rectangular areas and optimize them for drawing to the screen
+ C IRTTextControl A control to display some text in the UI, driven by values in the RT audio thread
+ C ISender ISender is a utility class which can be used to defer data from the realtime audio processing and send it to the GUI for visualization
+ C ISenderData ISenderData is used to represent a typed data packet, that may contain values for multiple channels
+ C IShaderControl This control allows you to draw to the UI via a shader written using the Skia shading language, which is similar to GLSL
+ C IShadow Used to specify properties of a drop-shadow to a layer
+ C ISkLottieControl A control that hosts a Lottie animation, via Skia's Skottie module https://skia.org/user/modules/skottie
+ C ISkParagraphControl A control that demonstrates how to draw rich text using SkParagraph
+ C ISliderControlBase A base class for slider/fader controls, to handle mouse action and Sender
+ C IStrokeOptions Used to manage stroke behaviour for path based drawing back ends
+ C ISVG User-facing SVG abstraction that you use to manage SVG data ISVG doesn't actually own the image data
+ C ISVGButtonControl A vector button/momentary switch control which shows an SVG image
+ C ISVGControl A basic control to draw an SVG image to the screen
+ C ISVGKnobControl A vector knob/dial control which rotates an SVG image
+ C ISVGSliderControl A Slider control with and SVG for track and handle
+ C ISVGSwitchControl A vector switch control which shows one of multiple SVG states
+ C ISVGToggleControl A vector toggle switch control which shows an SVG image
+ C ISwitchControlBase A base class for switch controls
+ C ISysEx A struct for dealing with SysEx messages
+ C 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
+ C ITextControl A basic control to display some text
+ C ITextEntryControl A Text entry widget drawn by IGraphics
+ C ITextToggleControl A control to toggle between two text strings on click
+ C ITimeInfo Encapsulates information about the host transport state
+ C IURLControl A control to show a clickable URL, that changes color after clicking
+ C IVBakedPresetManagerControl A "meta control" for a "preset manager" for "baked in" factory presets It adds several child buttons
+ C IVButtonControl A vector button/momentary switch control
+ C IVColorSpec Contains a set of 9 colors used to theme IVControls
+ C IVColorSwatchControl A control to show a color swatch of up to 9 colors
+ C IVDiskPresetManagerControl A "meta control" for a "preset manager" for disk-based preset files It adds several child buttons
+ C IVDisplayControl A control to display a rolling graphics of historical values
+ C IVec2 Encapsulate an xy point in one struct
+ C IVectorBase A base interface to be combined with IControl for vectorial controls "IVControls", in order for them to share a common style If you need more flexibility, you're on your own!
+ C IVGroupControl A control to draw a rectangle around a named IControl group
+ C IVKeyboardControl Vectorial keyboard control
+ C IVKnobControl A vector knob control drawn using graphics primitives
+ C IVLabelControl A vector label control that can display text with a shadow
+ ► C IVLEDMeterControl Vectorial multi-channel capable meter control with segmented LEDs, log response
+ C LEDRange LED Range comprises info for a range of LED segments
+ C IVMenuButtonControl A vector button that pops up a menu
+ C IVMeterControl Vectorial multi-channel capable meter control, linear or log response
+ C IVMultiSliderControl A vectorial multi-slider control
+ C IVMultiToggleControl A vectorial multi-toggle control, could be used for a trigger in a step sequencer or tarnce gate
+ C IVNumberBoxControl A "meta control" for a number box with an Inc/Dec button It adds several child buttons if buttons = true
+ C IVPanelControl A panel control which can be styled with emboss etc
+ C IVPeakAvgMeterControl Vectorial multi-channel capable meter control, with log response, held-peaks and filled-average/rms Requires an IPeakAvgSender
+ ► C IVPlotControl A vector plot to display functions and waveforms
+ C Plot Groups a plot function and color
+ C IVRadioButtonControl A vector "radio buttons" switch control
+ C IVRangeSliderControl A vector range slider control, with two handles
+ C IVScopeControl Vectorial multi-channel capable oscilloscope control
+ C IVSliderControl A vector slider control
+ C IVSlideSwitchControl A switch with a slide animation when clicked
+ C IVStyle A struct encapsulating a set of properties used to configure IVControls
+ C IVSwitchControl A vector switch control
+ C IVTabbedPagesControl A control to manage tabbed pages of sub controls Basic usage example:
+ C IVTabPage A control used as the base class for a tabbed page of subcontrols
+ C IVTabSwitchControl A vector "tab" multi switch control
+ C IVToggleControl A vector toggle control
+ C IVTrackControlBase A base class for mult-strip/track controls, such as multi-sliders, meters Track refers to the channel/strip, Step refers to cross-axis steps, e.g
+ C IVXYPadControl A vector XY Pad slider control
+ C IWebViewControl A control that allows the embedding of HTML UI inside an IGraphics context using a platform-native webview and bi-directional communication with that content NOTE: this control attaches a sub view on top of the IGraphics view, so it will render all content on-top The platform native webviews run in a separate process and communicate via IPC
+ C IWheelControl Vectorial "wheel" control for pitchbender/modwheel
+ C ParamTuple In certain cases we need to queue parameter changes for transferral between threads
+ C PlaceHolder A control to use as a placeholder during development
+ C ReaperAction Helper struct for registering Reaper Actions
+ C ReaperExtBase Reaper extension base class interface
+ C SysExData This structure is used when queueing Sysex messages
+ C TestAnimationControl Control to test animation
+ C TestArcControl Control to test drawing arcs
+ C TestBezierControl Control to test drawing bezier curves
+ C TestBlendControl Control to test blend methods
+ C TestColorControl Control to colors
+ C TestCursorControl Control to test changing the platform cursor
+ C TestCustomShaderControl Control to test IGraphicsNanoVG with Metal Shaders
+ C TestDirBrowseControl Control to test IDirBrowseControlBase
+ C TestDragAndDropControl Control to test dropping single and multiple files
+ C TestDrawContextControl Control to test obtaining a drawing API (NanoVG, Skia, Canvas) context and using that API within an IControl
+ C TestDropShadowControl Control to test layer drop shadows
+ C TestFlexBoxControl Control to test IGraphicsFlexBox
+ C TestFontControl Control to test drawing fonts
+ C TestGesturesControl Control to test multi gesture recognizers
+ C TestGradientControl Control to test drawing gradients with path based drawing backends
+ C TestImageControl Control to test drawing bitmaps
+ C TestKeyboardControl Control to test keyboard input
+ C TestLayerControl Control to test IGraphics layers
+ C TestMaskControl Control to display the size of a region
+ C TestMPSControl Control to test IGraphicsNanoVG with Metal Performance Shaders
+ C TestMTControl Control to test multi touch
+ C TestMultiPathControl Control to test drawing paths in path-based drawing backends
+ C TestPolyControl Control to test drawing polygons
+ C TestShadowGradientControl Control to test drawing shadows with gradients
+ C TestSizeControl Control to display the size of a region
+ C TestSVGControl Control to test drawing SVGs
+ C TestTextControl Control to test drawing text
+ C TestTextOrientationControl Control to test drawing text with orientation
+ C TestTextSizeControl Control to test drawing text with varying size
+ C Timer Base class for timer
diff --git a/class_drag_and_drop_helpers_1_1_data_object-members.html b/class_drag_and_drop_helpers_1_1_data_object-members.html
new file mode 100644
index 00000000..2c04c768
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_data_object-members.html
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+iPlug 2: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iPlug2 - C++ Audio Plug-in Framework
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for DragAndDropHelpers::DataObject , including all inherited members.
+
+ acceptFormat (FORMATETC *f) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ AddRef () (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ DAdvise (FORMATETC *, DWORD, IAdviseSink *, DWORD *) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ DataObject (const FORMATETC *f, const char *filePath) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ DUnadvise (DWORD) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ EnumDAdvise (IEnumSTATDATA **) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ EnumFormatEtc (DWORD direction, IEnumFORMATETC **resultHandle) override (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ GetCanonicalFormatEtc (FORMATETC *, FORMATETC *pFormatOut) override (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ GetData (FORMATETC *pFormat, STGMEDIUM *pMedium) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ GetDataHere (FORMATETC *, STGMEDIUM *) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ QueryGetData (FORMATETC *pFormat) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ QueryInterface (REFIID refiid, void **resultHandle) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ Release () (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ SetData (FORMATETC *, STGMEDIUM *, BOOL) (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline
+ ~DataObject () (defined in DragAndDropHelpers::DataObject )DragAndDropHelpers::DataObject inline virtual
+
+
+
+
+
diff --git a/class_drag_and_drop_helpers_1_1_data_object.html b/class_drag_and_drop_helpers_1_1_data_object.html
new file mode 100644
index 00000000..62d81299
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_data_object.html
@@ -0,0 +1,658 @@
+
+
+
+
+
+
+
+
+iPlug 2: DragAndDropHelpers::DataObject Class Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iPlug2 - C++ Audio Plug-in Framework
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DataObject (const FORMATETC *f, const char *filePath)
+
+HRESULT STDMETHODCALLTYPE QueryInterface (REFIID refiid, void **resultHandle)
+
+ULONG STDMETHODCALLTYPE AddRef ()
+
+ULONG STDMETHODCALLTYPE Release ()
+
+bool acceptFormat (FORMATETC *f)
+
+HRESULT STDMETHODCALLTYPE GetData (FORMATETC *pFormat, STGMEDIUM *pMedium)
+
+HRESULT STDMETHODCALLTYPE QueryGetData (FORMATETC *pFormat)
+
+HRESULT GetCanonicalFormatEtc (FORMATETC *, FORMATETC *pFormatOut) override
+
+HRESULT EnumFormatEtc (DWORD direction, IEnumFORMATETC **resultHandle) override
+
+HRESULT STDMETHODCALLTYPE GetDataHere (FORMATETC *, STGMEDIUM *)
+
+HRESULT STDMETHODCALLTYPE SetData (FORMATETC *, STGMEDIUM *, BOOL)
+
+HRESULT STDMETHODCALLTYPE DAdvise (FORMATETC *, DWORD, IAdviseSink *, DWORD *)
+
+HRESULT STDMETHODCALLTYPE DUnadvise (DWORD)
+
+HRESULT STDMETHODCALLTYPE EnumDAdvise (IEnumSTATDATA **)
+
+
+
+
+
Definition at line 178 of file IGraphicsWin_dnd.h .
+
+
+
◆ DataObject()
+
+
+
+
+
+
+
+
+ DragAndDropHelpers::DataObject::DataObject
+ (
+ const FORMATETC *
+ f ,
+
+
+
+
+ const char *
+ filePath
+
+
+
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ ~DataObject()
+
+
+
+
+
+
+
+
+ virtual DragAndDropHelpers::DataObject::~DataObject
+ (
+ )
+
+
+
+
+
+inline virtual
+
+
+
+
+
+
+
◆ acceptFormat()
+
+
+
+
+
+
+
+
+ bool DragAndDropHelpers::DataObject::acceptFormat
+ (
+ FORMATETC *
+ f )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ AddRef()
+
+
+
+
+
+
+
+
+ ULONG STDMETHODCALLTYPE DragAndDropHelpers::DataObject::AddRef
+ (
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ DAdvise()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::DAdvise
+ (
+ FORMATETC *
+ ,
+
+
+
+
+ DWORD
+ ,
+
+
+
+
+ IAdviseSink *
+ ,
+
+
+
+
+ DWORD *
+
+
+
+
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ DUnadvise()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::DUnadvise
+ (
+ DWORD
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ EnumDAdvise()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::EnumDAdvise
+ (
+ IEnumSTATDATA **
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ EnumFormatEtc()
+
+
+
+
+
+
+
+
+ HRESULT DragAndDropHelpers::DataObject::EnumFormatEtc
+ (
+ DWORD
+ direction ,
+
+
+
+
+ IEnumFORMATETC **
+ resultHandle
+
+
+
+ )
+
+
+
+
+
+inline override
+
+
+
+
+
+
◆ GetCanonicalFormatEtc()
+
+
+
+
+
+
+
+
+ HRESULT DragAndDropHelpers::DataObject::GetCanonicalFormatEtc
+ (
+ FORMATETC *
+ ,
+
+
+
+
+ FORMATETC *
+ pFormatOut
+
+
+
+ )
+
+
+
+
+
+inline override
+
+
+
+
+
+
◆ GetData()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::GetData
+ (
+ FORMATETC *
+ pFormat ,
+
+
+
+
+ STGMEDIUM *
+ pMedium
+
+
+
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ GetDataHere()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::GetDataHere
+ (
+ FORMATETC *
+ ,
+
+
+
+
+ STGMEDIUM *
+
+
+
+
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ QueryGetData()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::QueryGetData
+ (
+ FORMATETC *
+ pFormat )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ QueryInterface()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::QueryInterface
+ (
+ REFIID
+ refiid ,
+
+
+
+
+ void **
+ resultHandle
+
+
+
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ Release()
+
+
+
+
+
+
+
+
+ ULONG STDMETHODCALLTYPE DragAndDropHelpers::DataObject::Release
+ (
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ SetData()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DataObject::SetData
+ (
+ FORMATETC *
+ ,
+
+
+
+
+ STGMEDIUM *
+ ,
+
+
+
+
+ BOOL
+
+
+
+
+ )
+
+
+
+
+
+inline
+
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
diff --git a/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.map b/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.map
new file mode 100644
index 00000000..6265f843
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.md5 b/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.md5
new file mode 100644
index 00000000..d82abc04
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.md5
@@ -0,0 +1 @@
+fbffb025264a39d4cb763f19376cd4ad
\ No newline at end of file
diff --git a/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.svg b/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.svg
new file mode 100644
index 00000000..b72bcd10
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_data_object__inherit__graph.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+DragAndDropHelpers::DataObject
+
+
+Node1
+
+
+DragAndDropHelpers
+::DataObject
+
+
+
+
+
+Node2
+
+
+IDataObject
+
+
+
+
+
+Node2->Node1
+
+
+
+
+
diff --git a/class_drag_and_drop_helpers_1_1_drop_source-members.html b/class_drag_and_drop_helpers_1_1_drop_source-members.html
new file mode 100644
index 00000000..553ed88c
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_drop_source-members.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+iPlug 2: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iPlug2 - C++ Audio Plug-in Framework
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for DragAndDropHelpers::DropSource , including all inherited members.
+
+
+
+
+
diff --git a/class_drag_and_drop_helpers_1_1_drop_source.html b/class_drag_and_drop_helpers_1_1_drop_source.html
new file mode 100644
index 00000000..523070b6
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_drop_source.html
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
+iPlug 2: DragAndDropHelpers::DropSource Class Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ iPlug2 - C++ Audio Plug-in Framework
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
+
+
+
+
+HRESULT STDMETHODCALLTYPE QueryInterface (REFIID refiid, void **resultHandle) override
+
+ULONG STDMETHODCALLTYPE AddRef () override
+
+ULONG STDMETHODCALLTYPE Release () override
+
+HRESULT STDMETHODCALLTYPE QueryContinueDrag (BOOL escapeKeyPressed, DWORD grfKeyState) override
+
+HRESULT STDMETHODCALLTYPE GiveFeedback (DWORD) override
+
+
+
+
+
Definition at line 20 of file IGraphicsWin_dnd.h .
+
+
+
◆ DropSource()
+
+
+
+
+
+
+
+
+ DragAndDropHelpers::DropSource::DropSource
+ (
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
◆ ~DropSource()
+
+
+
+
+
+
+
+
+ DragAndDropHelpers::DropSource::~DropSource
+ (
+ )
+
+
+
+
+
+inline
+
+
+
+
+
+
+
◆ AddRef()
+
+
+
+
+
+
+
+
+ ULONG STDMETHODCALLTYPE DragAndDropHelpers::DropSource::AddRef
+ (
+ )
+
+
+
+
+
+inline override
+
+
+
+
+
+
◆ GiveFeedback()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DropSource::GiveFeedback
+ (
+ DWORD
+ )
+
+
+
+
+
+inline override
+
+
+
+
+
+
◆ QueryContinueDrag()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DropSource::QueryContinueDrag
+ (
+ BOOL
+ escapeKeyPressed ,
+
+
+
+
+ DWORD
+ grfKeyState
+
+
+
+ )
+
+
+
+
+
+inline override
+
+
+
+
+
+
◆ QueryInterface()
+
+
+
+
+
+
+
+
+ HRESULT STDMETHODCALLTYPE DragAndDropHelpers::DropSource::QueryInterface
+ (
+ REFIID
+ refiid ,
+
+
+
+
+ void **
+ resultHandle
+
+
+
+ )
+
+
+
+
+
+inline override
+
+
+
+
+
+
◆ Release()
+
+
+
+
+
+
+
+
+ ULONG STDMETHODCALLTYPE DragAndDropHelpers::DropSource::Release
+ (
+ )
+
+
+
+
+
+inline override
+
+
+
+
+
The documentation for this class was generated from the following file:
+
+
+
+
+
diff --git a/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.map b/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.map
new file mode 100644
index 00000000..707f54dd
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.md5 b/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.md5
new file mode 100644
index 00000000..4e302eb3
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.md5
@@ -0,0 +1 @@
+a2805202587421d019fd9bcd16c8a8fa
\ No newline at end of file
diff --git a/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.svg b/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.svg
new file mode 100644
index 00000000..03840da5
--- /dev/null
+++ b/class_drag_and_drop_helpers_1_1_drop_source__inherit__graph.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+DragAndDropHelpers::DropSource
+
+
+Node1
+
+
+DragAndDropHelpers
+::DropSource
+
+
+
+
+
+Node2
+
+
+IDropSource
+
+
+
+
+
+Node2->Node1
+
+
+
+
+
diff --git a/class_i_bubble_control.html b/class_i_bubble_control.html
index 3117d0e4..275edd30 100644
--- a/class_i_bubble_control.html
+++ b/class_i_bubble_control.html
@@ -654,7 +654,7 @@