#[non_exhaustive]pub struct ShellControlState {
pub control: ShellControl,
pub hovered: bool,
pub pressed: bool,
pub focused: bool,
pub window_active: bool,
pub appearance: WindowAppearance,
pub high_contrast: bool,
pub colors: ShellColors,
pub focus_color: u32,
pub scale: f32,
pub target_size: Pixels,
pub preview: bool,
}Expand description
Everything a presenter may use to draw one control.
New fields may be added in minor releases; read the fields you need.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.control: ShellControlWhich control to draw.
hovered: boolThe pointer is over the control (or hover is simulated in a preview).
pressed: boolThe primary button is held down on the control.
focused: boolKeyboard focus is visible on the control (or simulated in a preview). The shell already paints a focus ring; use this only for extra treatment.
window_active: boolThe window is active.
appearance: WindowAppearanceLight or dark appearance used for the frame.
high_contrast: boolHigh contrast is in effect. Presenters should switch to high-contrast
artwork; colors already holds the shell’s high-contrast tokens.
colors: ShellColorsThe frame’s resolved colors for this appearance and activation.
focus_color: u32The focus-ring color the shell uses (0xRRGGBB).
scale: f32Logical text/target scale (0.5–4), independent of device DPI.
target_size: PixelsSide of the square clickable target. Presenter content is centered in it and clipped to it; draw the icon smaller to keep a comfortable target.
preview: boolDrawn in an inert crate::ClientFramePreview, not a real window.
Trait Implementations§
Source§impl Clone for ShellControlState
impl Clone for ShellControlState
Source§impl Debug for ShellControlState
impl Debug for ShellControlState
Source§impl PartialEq for ShellControlState
impl PartialEq for ShellControlState
impl StructuralPartialEq for ShellControlState
Auto Trait Implementations§
impl Forget for ShellControlState
impl Freeze for ShellControlState
impl Move for ShellControlState
impl RefUnwindSafe for ShellControlState
impl Send for ShellControlState
impl Sync for ShellControlState
impl Unpin for ShellControlState
impl UnsafeUnpin for ShellControlState
impl UnwindSafe for ShellControlState
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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