pub struct ClientFramePreview {
pub title: SharedString,
pub options: ShellOptions,
pub appearance: WindowAppearance,
pub active: bool,
pub maximized: bool,
pub fullscreen: bool,
pub tiling: Tiling,
pub button_layout: Option<WindowButtonLayout>,
pub show_focus: bool,
pub show_hover: bool,
/* private fields */
}Expand description
A visual-only client-frame preview inside an application’s content area.
Uses the production frame renderer and resolver, but attaches no window actions, drag/resize regions or focusable frame buttons. It never changes the host window’s decorations, insets or state. Simulated state is not detected desktop information.
Fields§
§title: SharedStringDisplayed preview title.
options: ShellOptionsPer-window overrides to preview against the current desktop snapshot.
appearance: WindowAppearanceSimulated appearance, independent of native window appearance.
active: boolSimulated activation state.
maximized: boolSimulated maximization state.
fullscreen: boolHide preview chrome, as a real fullscreen client frame does.
tiling: TilingSimulated tiled edges.
Preview button layout; None uses the current platform layout or the shell fallback.
show_focus: boolVisually simulate keyboard focus on the close button without making it actionable.
show_hover: boolVisually simulate hovering over close, without a native window action.
Implementations§
Source§impl ClientFramePreview
impl ClientFramePreview
Sourcepub fn new(
title: impl Into<SharedString>,
options: ShellOptions,
content: impl IntoElement,
) -> Self
pub fn new( title: impl Into<SharedString>, options: ShellOptions, content: impl IntoElement, ) -> Self
Construct an active, floating, light preview. Give its parent a bounded size.
Trait Implementations§
Source§impl IntoElement for ClientFramePreview
impl IntoElement for ClientFramePreview
Source§type Element = ViewElement<ClientFramePreview>
type Element = ViewElement<ClientFramePreview>
Source§fn into_element(self) -> Self::Element
fn into_element(self) -> Self::Element
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
AnyElement.Source§impl RenderOnce for ClientFramePreview
impl RenderOnce for ClientFramePreview
Source§fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement
Render::render() method
which takes a mutable reference.Auto Trait Implementations§
impl !RefUnwindSafe for ClientFramePreview
impl !Send for ClientFramePreview
impl !Sync for ClientFramePreview
impl !UnwindSafe for ClientFramePreview
impl Forget for ClientFramePreview
impl Freeze for ClientFramePreview
impl Move for ClientFramePreview
impl Unpin for ClientFramePreview
impl UnsafeUnpin for ClientFramePreview
Blanket Implementations§
Source§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
Source§fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Source§fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
Source§fn with_spring<T>(
self,
id: impl Into<ElementId>,
animation: SpringAnimation<T>,
animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static,
) -> SpringAnimationElement<Self>
fn with_spring<T>( self, id: impl Into<ElementId>, animation: SpringAnimation<T>, animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static, ) -> SpringAnimationElement<Self>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
Source§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more