pub struct ViewportTokens {Show 14 fields
pub background: Color32,
pub backdrop: Color32,
pub frame: Color32,
pub grid: Color32,
pub guide: Color32,
pub handle: Color32,
pub handle_hover: Color32,
pub handle_outline: Color32,
pub cursor_fill: Color32,
pub cursor_outline: Color32,
pub loupe_background: Color32,
pub loupe_frame: Color32,
pub loupe_grid: Color32,
pub loupe_marker: Color32,
}Expand description
The viewport’s colours, from the installed theme.
Fields§
§background: Color32Around the image.
backdrop: Color32Under the image where no tile has arrived yet.
frame: Color32The image’s outline.
grid: Color32The pixel grid at high zoom.
guide: Color32Overlay shapes and guides.
handle: Color32A handle at rest.
handle_hover: Color32A handle under the pointer or dragged.
handle_outline: Color32The ring around a handle, so it reads on any image.
cursor_fill: Color32Tool cursors’ strokes and a brush outline’s line.
cursor_outline: Color32The ring around a cursor’s strokes, so it reads on any image.
loupe_background: Color32Around the loupe’s picture and behind its readout.
loupe_frame: Color32The loupe’s outline.
loupe_grid: Color32The loupe’s pixel grid.
loupe_marker: Color32The square around the loupe’s centre pixel.
Implementations§
Source§impl ViewportTokens
impl ViewportTokens
Sourcepub fn of(ctx: &Context) -> ViewportTokens
pub fn of(ctx: &Context) -> ViewportTokens
The tokens of the theme installed in ctx.
Trait Implementations§
Source§impl Clone for ViewportTokens
impl Clone for ViewportTokens
Source§fn clone(&self) -> ViewportTokens
fn clone(&self) -> ViewportTokens
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ViewportTokens
impl Debug for ViewportTokens
Source§impl PartialEq for ViewportTokens
impl PartialEq for ViewportTokens
impl Copy for ViewportTokens
impl StructuralPartialEq for ViewportTokens
Auto Trait Implementations§
impl Freeze for ViewportTokens
impl RefUnwindSafe for ViewportTokens
impl Send for ViewportTokens
impl Sync for ViewportTokens
impl Unpin for ViewportTokens
impl UnsafeUnpin for ViewportTokens
impl UnwindSafe for ViewportTokens
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.