pub struct Interface { /* private fields */ }
Expand description
System for storing interface related objects.
Implementations§
Source§impl Interface
impl Interface
Sourcepub fn default_font(&self) -> DefaultFont
pub fn default_font(&self) -> DefaultFont
Retrieve the current default font.
Sourcepub fn set_default_font(&self, default_font: DefaultFont)
pub fn set_default_font(&self, default_font: DefaultFont)
Set the default font.
Note: An invalid font will not cause a panic, but text may not render.
Sourcepub fn add_binary_font<T: AsRef<[u8]> + Sync + Send + 'static>(&self, data: T)
pub fn add_binary_font<T: AsRef<[u8]> + Sync + Send + 'static>(&self, data: T)
Load a font from a binary source.
Note: Invalid fonts will not cause an error, but text may not render.*
Sourcepub fn get_bin_atop(&self, window: WindowID, x: f32, y: f32) -> Option<Arc<Bin>>
pub fn get_bin_atop(&self, window: WindowID, x: f32, y: f32) -> Option<Arc<Bin>>
Get the top-most Bin
given a window & position.
Sourcepub fn get_bins_atop(
&self,
window_id: WindowID,
x: f32,
y: f32,
) -> Vec<Arc<Bin>>
pub fn get_bins_atop( &self, window_id: WindowID, x: f32, y: f32, ) -> Vec<Arc<Bin>>
Get Bin
’s atop the provided window & position.
Note: This is sorted where the top-most is first and the bottom-most is last.
Sourcepub fn get_bin_id_atop(&self, window: WindowID, x: f32, y: f32) -> Option<BinID>
pub fn get_bin_id_atop(&self, window: WindowID, x: f32, y: f32) -> Option<BinID>
Get the top-most BinID
given a window & position.
Sourcepub fn get_bin_ids_atop(&self, window: WindowID, x: f32, y: f32) -> Vec<BinID>
pub fn get_bin_ids_atop(&self, window: WindowID, x: f32, y: f32) -> Vec<BinID>
Get BinID
’s atop the provided window & position.
Note: This is sorted where the top-most is first and the bottom-most is last.
Sourcepub fn bins(&self) -> Vec<Arc<Bin>>
pub fn bins(&self) -> Vec<Arc<Bin>>
Returns a list of all bins that have a strong reference.
Note: Keeping this list will keep all bins returned alive and prevent them from being dropped. This list should be dropped asap to prevent issues with bins being dropped.
Sourcepub fn new_bin(&self) -> Arc<Bin>
pub fn new_bin(&self) -> Arc<Bin>
Create a new Bin
Note: This Bin
will not have a window association. Using this method on a Window
should be the preferred way of creating s Bin
.
Auto Trait Implementations§
impl !Freeze for Interface
impl !RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl !UnwindSafe for Interface
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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