pub enum Request {
ActivateTool {
tool: String,
},
SelectBody {
body: String,
},
JournalLabel {
label: String,
},
SwitchWorkbench {
workbench: String,
},
OrientCamera {
origin: [f32; 3],
normal: [f32; 3],
up: [f32; 3],
},
FinishEditing,
SaveFile {
name: String,
kind: String,
extension: String,
contents: Vec<u8>,
},
SaveFiles {
files: Vec<FileToWrite>,
},
OpenFile {
id: String,
kinds: Vec<FileKind>,
multiple: bool,
},
CopyText {
text: String,
},
OpenMenu {
tag: String,
items: Vec<MenuItem>,
},
}Expand description
Something a bench asks the host to do once its call returns.
A package builds these, so a variant keeps its fields for as long as
the contract’s minor version holds: a new option comes as a new
variant, or as a new struct that derives Default.
Variants§
ActivateTool
SelectBody
JournalLabel
Name the undo step this gesture closes.
SwitchWorkbench
OrientCamera
FinishEditing
SaveFile
Ask the user where to save contents (the save_dialog
capability).
SaveFiles
Ask the user for a folder and write every file into it (the
save_dialog capability): one program per operation.
Fields
files: Vec<FileToWrite>OpenFile
Ask the user for a file to read, or several with multiple (the
open_dialog capability), of the kinds offered; the answer comes
as Event::FileOpened with this id.
CopyText
Put text on the system clipboard (contract 0.1.4): a table the
bench made, to paste into a spreadsheet.
OpenMenu
Open a menu of items at the pointer (from 0.1.8), for something
the package draws itself: a right click on a handle of its own. The
pick comes back as menu_command with MenuScope::Popup and
tag; Escape or a click elsewhere puts the menu away and says
nothing.