20#include "IPlugPlatformView.h"
25BEGIN_IGRAPHICS_NAMESPACE
32 using AttachFunc = std::function<void(
void* pParentView)>;
41 , mAttachFunc(attachFunc)
48 mPlatformView =
nullptr;
53 mPlatformView = CreatePlatformView(
GetUI()->GetWindow(), mRECT.L, mRECT.T, mRECT.
W(), mRECT.
H(),
GetUI()->GetTotalScale());
55 AttachSubViews(mPlatformView);
64 UpdateChildViewBounds();
69 UpdateChildViewBounds();
75 virtual void AttachSubViews(
void* pPlatformView)
78 mAttachFunc(pPlatformView);
81 void* GetPlatformView()
86 void Hide(
bool hide)
override
95 void UpdateChildViewBounds()
98 SetChildViewBounds(mRECT.L * ds, mRECT.T * ds, mRECT.
W() * ds, mRECT.
H() * ds, ds);
101 void* mPlatformView =
nullptr;
102 AttachFunc mAttachFunc;
105END_IGRAPHICS_NAMESPACE
This file contains the base IControl implementation, along with some base classes for specific types ...
The lowest level base class of an IGraphics control.
virtual void Hide(bool hide)
Shows or hides the IControl.
The lowest level base class of an IGraphics context.
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.
Used to manage mouse modifiers i.e.
Used to manage a rectangular area, independent of draw class/platform.