pub struct Thumbnail { /* private fields */ }Expand description
One thumbnail.
Implementations§
Source§impl Thumbnail
impl Thumbnail
Sourcepub fn new(label: impl Into<String>) -> Thumbnail
pub fn new(label: impl Into<String>) -> Thumbnail
A thumbnail named label (its accessible name).
Sourcepub fn image(self, texture: TextureId, size: [u32; 2]) -> Thumbnail
pub fn image(self, texture: TextureId, size: [u32; 2]) -> Thumbnail
The image: a texture and its size in pixels (drawn fitted, its aspect kept).
Sourcepub fn placeholder(self, color: Color32) -> Thumbnail
pub fn placeholder(self, color: Color32) -> Thumbnail
The colour shown until the image is there (the image’s average, for example).
Sourcepub fn icon(self, icon: Icon) -> Thumbnail
pub fn icon(self, icon: Icon) -> Thumbnail
A sign over the placeholder, for what has no image: a folder, a file without a preview, a failure.
Sourcepub fn caption(self, caption: impl Into<String>) -> Thumbnail
pub fn caption(self, caption: impl Into<String>) -> Thumbnail
A line of text under the image, cut to the thumbnail’s width. Give
the thumbnail caption_height more room for it.
pub fn selected(self, selected: bool) -> Thumbnail
Sourcepub fn passive(self) -> Thumbnail
pub fn passive(self) -> Thumbnail
A picture only: drawn as usual, but it takes no click, drag or keyboard focus, so the pointer reaches what is under it (a table row, a list item that owns the click). It still senses the hover, so a tooltip given to its response shows. Its accessible role is an image, named by its label.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Thumbnail
impl RefUnwindSafe for Thumbnail
impl Send for Thumbnail
impl Sync for Thumbnail
impl Unpin for Thumbnail
impl UnsafeUnpin for Thumbnail
impl UnwindSafe for Thumbnail
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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