Vixen
dd8b0a81
csharp
public sealed class PlatformClipboard

Fills IUiClipboard from the platform's real pasteboard.

Read the guide page for this →

Remarks

The third join this assembly exists for, and the same shape as the other two: a Core/ assembly may not name IClipboard, so Vixen.Ui declares what a text control needs and this turns it into the platform's.

⚠ Gated on Clipboard, unlike PlatformCursor. The difference is what absence looks like: a platform with no cursor implements CursorShape as a setter that does nothing, so wiring it unconditionally costs a no-op. A platform with no clipboard has no honest answer to "is there text on it" — and a document whose Clipboard is left null greys Cut, Copy and Paste out, which is the truth and is what HasClipboard is asked for.

Fields and properties (1)

  • public bool HasText

    Whether the clipboard currently holds text.

Methods (4)

  • public PlatformClipboard(IClipboard clipboard)

    Fills IUiClipboard from the platform's real pasteboard.

  • public bool TryGetText(out string? text)

    Reads the clipboard's text.

  • public bool SetText(string text)

    Puts text on the clipboard.

  • public static bool Install(UiDocument document, IPlatform platform)

    Installs the platform's clipboard on a document, if it has one.

Used by (2)

  • UiApplicationVixen.Ui.Desktop
  • EditorHostVixen.Editor.Host