UI module

copy_selection

procedureextensionexperimentalsince 0.31.0Source

Copy the selection to the clipboard.

Example↗
edit: Text_Edit;
defer free_text_edit(*edit);
ui := headless();
defer free_ui(*ui);
copy_selection(*ui, *edit);   // puts the selection on the clipboard

This one is only checked to compile, not run.

copy_selection :: (ui: *UI_State, edit: *Text_Edit)

Copy the selection to the clipboard.

Parameters

ui: *UI_State
the UI whose clipboard hooks and text measuring to use.
edit: *Text_Edit
the text being edited.
Example↗
edit: Text_Edit;
defer free_text_edit(*edit);
ui := headless();
defer free_ui(*ui);
copy_selection(*ui, *edit);   // puts the selection on the clipboard

This one is only checked to compile, not run.

See also