Table of Contents

Class NoOpPluginCanvas

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

The canvas a host that draws nothing hands out: it keeps the state the plugin sets, so the plugin's own logic runs unchanged, and never paints.

public sealed class NoOpPluginCanvas : IPluginCanvas, IDisposable
Inheritance
NoOpPluginCanvas
Implements
Inherited Members

Constructors

NoOpPluginCanvas(PluginCanvasDescriptor)

Makes an inert canvas that answers with the descriptor's values.

public NoOpPluginCanvas(PluginCanvasDescriptor descriptor)

Parameters

descriptor PluginCanvasDescriptor

How the canvas was described when registered.

Properties

Anchor

Which corner or edge of the screen the canvas is measured from. Set it to move the canvas.

public PluginCanvasAnchor Anchor { get; set; }

Property Value

PluginCanvasAnchor

CanvasId

The plugin's own name for this canvas, as registered.

public string CanvasId { get; }

Property Value

string

Height

The canvas's height in pixels, as registered.

public int Height { get; }

Property Value

int

IsDisposed

True once Dispose() has been called.

public bool IsDisposed { get; }

Property Value

bool

IsVisible

Whether the canvas is shown. Set it to show or hide the canvas; what was painted is kept while hidden.

public bool IsVisible { get; set; }

Property Value

bool

Offset

How far from the anchor the canvas sits, in pixels. Set it to move the canvas.

public PluginPoint Offset { get; set; }

Property Value

PluginPoint

PointerHandler

Kept so the plugin's own logic runs unchanged; never called, because nothing is shown to point at.

public Action<PluginPointerEvent>? PointerHandler { get; set; }

Property Value

Action<PluginPointerEvent>

Width

The canvas's width in pixels, as registered.

public int Width { get; }

Property Value

int

Methods

Dispose()

Marks the canvas disposed; there is nothing to remove.

public void Dispose()

Invalidate()

Does nothing; there is nothing to paint on.

public void Invalidate()

ReleasePointer()

Does nothing; nothing is ever held.

public void ReleasePointer()