Class ClipboardBase
Shared abstract class to enforce rules from the implementation of the
IClipboard interface.
Inheritance
ClipboardBase
Assembly: Terminal.Gui.dll
Syntax
public abstract class ClipboardBase : IClipboard
Properties
|
Edit this page
View Source
IsSupported
Returns true if the environmental dependencies are in place to interact with the OS clipboard
Declaration
public abstract bool IsSupported { get; }
Property Value
Methods
|
Edit this page
View Source
GetClipboardData()
Returns the contents of the OS clipboard if possible.
Declaration
public string GetClipboardData()
Returns
| Type |
Description |
| string |
The contents of the OS clipboard if successful. |
Exceptions
|
Edit this page
View Source
GetClipboardDataImpl()
Returns the contents of the OS clipboard if possible. Implemented by
ConsoleDriver-specific subclasses.
Declaration
protected abstract string GetClipboardDataImpl()
Returns
| Type |
Description |
| string |
The contents of the OS clipboard if successful. |
Exceptions
|
Edit this page
View Source
SetClipboardData(string)
Pastes the text to the OS clipboard if possible.
Declaration
public void SetClipboardData(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
The text to paste to the OS clipboard. |
Exceptions
|
Edit this page
View Source
SetClipboardDataImpl(string)
Pastes the
text to the OS clipboard if possible. Implemented by
ConsoleDriver-specific subclasses.
Declaration
protected abstract void SetClipboardDataImpl(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
The text to paste to the OS clipboard. |
Exceptions
|
Edit this page
View Source
TryGetClipboardData(out string)
Copies the contents of the OS clipboard to result if possible.
Declaration
public bool TryGetClipboardData(out string result)
Parameters
| Type |
Name |
Description |
| string |
result |
The contents of the OS clipboard if successful, Empty if not. |
Returns
| Type |
Description |
| bool |
true the OS clipboard was retrieved, false otherwise. |
|
Edit this page
View Source
TrySetClipboardData(string)
Pastes the text to the OS clipboard if possible.
Declaration
public bool TrySetClipboardData(string text)
Parameters
| Type |
Name |
Description |
| string |
text |
The text to paste to the OS clipboard. |
Returns
| Type |
Description |
| bool |
true the OS clipboard was set, false otherwise. |
Implements