5 #ifndef __caviewlayer__ 6 #define __caviewlayer__ 8 #include "../iplatformviewlayer.h" 12 #include "../platform_macos.h" 17 class CAViewLayer :
public IPlatformViewLayer,
public ICocoaViewLayer
21 CAViewLayer (CALayer* parent);
22 ~CAViewLayer () noexcept override;
24 bool init (IPlatformViewLayerDelegate* drawDelegate);
26 void invalidRect (const CRect& size) override;
27 void setSize (const CRect& size) override;
28 void setZIndex (uint32_t zIndex) override;
29 void setAlpha (
float alpha) override;
30 void draw (CDrawContext* context, const CRect& updateRect) override;
31 void onScaleFactorChanged (
double newScaleFactor) override;
33 CALayer* getCALayer ()
const override {
return layer; }
43 #endif // __caviewlayer__ Definition: customcontrols.cpp:8