ClipboardChain

Local clipboard provider. Makes it possible to copy and paste text between nodes in the same branch.

ClipboardChain does not communicate with the system, so the clipboard will *not* be accessible to other apps. This makes this node suitable for testing.

Constructors

this
this(Node next)
Undocumented in source.

Members

Functions

afterResize
void afterResize(Vector2 )
Undocumented in source. Be warned that the author may not have intended to support it.
beforeResize
void beforeResize(Vector2 )
Undocumented in source. Be warned that the author may not have intended to support it.
readClipboard
char[] readClipboard(char[] buffer, int offset)
Undocumented in source. Be warned that the author may not have intended to support it.
value
string value()
value
string value(string newValue)

Replace the clipboard contents.

writeClipboard
bool writeClipboard(string text)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin controlIO
Undocumented in source.

Inherited Members

From NodeChain

next
Node next(Node value)

Set the next node in chain.

next
inout(Node) next()
nextChain
inout(NodeChain) nextChain()
beforeResize
void beforeResize(Vector2 space)
Undocumented in source. Be warned that the author may not have intended to support it.
afterResize
void afterResize(Vector2 space)
Undocumented in source. Be warned that the author may not have intended to support it.
beforeDraw
void beforeDraw(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
afterDraw
void afterDraw(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.
resizeImpl
void resizeImpl(Vector2 space)
Undocumented in source. Be warned that the author may not have intended to support it.
drawImpl
void drawImpl(Rectangle outer, Rectangle inner)
Undocumented in source. Be warned that the author may not have intended to support it.

From ClipboardIO

writeClipboard
bool writeClipboard(string text)

Write text to the clipboard.

readClipboard
char[] readClipboard(char[] buffer, int offset)

Read text from the clipboard.

Examples

import fluid;

TextInput first, second;

// Children of a ClipboardChain will share the same clipboard
auto root = clipboardChain(
    vspace(
        first  = textInput(),
        second = textInput(),
    ),
);
root.draw();

// Text copied by the first input...
first.value = "Hello!";
first.selectAll();
first.copy();

// ... can now be pasted into the other
second.paste();
assert(second.value == "Hello!");

Meta