UI module

cut_selection

procedureextensionexperimentalsince 0.31.0Source

Copy the selection to the clipboard and delete it.

Example↗
edit: Text_Edit;
defer free_text_edit(*edit);
ui := headless();
defer free_ui(*ui);
cut_selection(*ui, *edit);    // copies the selection, then deletes it

This one is only checked to compile, not run.

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

Copy the selection to the clipboard and delete it.

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);
cut_selection(*ui, *edit);    // copies the selection, then deletes it

This one is only checked to compile, not run.

See also