pub struct HostOffer {Show 24 fields
pub id: String,
pub code: String,
pub name: String,
pub source: String,
pub size: HostSize,
pub resizable: bool,
pub focus: FocusPolicy,
pub owns_keys: Vec<ClaimKey>,
pub honours_claims: bool,
pub dismissed_by: Vec<Dismiss>,
pub lifetime: Lifetime,
pub window: Window,
pub keymap: bool,
pub projection: bool,
pub keeps: Vec<Keep>,
pub gives_ui: bool,
pub gives_app: bool,
pub scope: bool,
pub fault_boundary: bool,
pub display: HostDisplay,
pub cursor_images: bool,
pub free_content: bool,
pub hides_content: bool,
pub headless: bool,
}Expand description
What a host offers what is mounted in it.
Fields§
§id: StringA stable id (panel, dialog.custom).
code: StringIts column in docs/hosts.md (P, F…).
name: StringAs people call it.
source: StringWhere it is in the code.
size: HostSize§resizable: boolThe user can resize it.
focus: FocusPolicy§owns_keys: Vec<ClaimKey>Keys the host takes before the content (a modal’s Enter and Escape).
honours_claims: boolA content claiming a key the host owns gets it (a custom dialog: Ctrl+Enter accepts when the content claims Enter).
dismissed_by: Vec<Dismiss>§lifetime: Lifetime§window: Window§keymap: boolThe key dispatcher reaches it.
projection: boolPart of the context stack’s projection (ADR 0012).
keeps: Vec<Keep>§gives_ui: boolGives its content a Ui.
gives_app: boolGives its content the application (an AppHandle).
scope: boolDraws its content in a focus scope of its own.
fault_boundary: boolDraws its content inside a fault boundary.
display: HostDisplay§cursor_images: boolBitmap cursors are shown in it.
free_content: boolTakes any content (not only value-descriptor fields).
hides_content: boolIts content may stop being drawn while it lives (a tab behind another, a rolled-up palette).
headless: boolIt can be mounted in a headless test (kittest).
Implementations§
Source§impl HostOffer
impl HostOffer
Sourcepub fn new(id: &str, code: &str, name: &str) -> Self
pub fn new(id: &str, code: &str, name: &str) -> Self
A host filling a rect in the main window, shared focus,
persistent, with the keymap, a Ui, the application, a scope and
a fault boundary, sRGB, any content, testable headless.
pub fn size(self, size: HostSize) -> Self
pub fn resizable(self, on: bool) -> Self
pub fn focus(self, focus: FocusPolicy) -> Self
Sourcepub fn honours_claims(self) -> Self
pub fn honours_claims(self) -> Self
A content claiming a key the host owns gets it.