pub struct ResourcesBase {
pub basepath: PathBuf,
}Expand description
ResourceBase
Fields§
§basepath: PathBufbase path
Implementations§
Source§impl ResourcesBase
ResourcesBase
impl ResourcesBase
ResourcesBase
Sourcepub fn resource_img(&self, f: &str, p: bool) -> ColorImage
pub fn resource_img(&self, f: &str, p: bool) -> ColorImage
load resource img
- f: &str filename
- p: bool (true: self.basepath false: full path)
- result: ColorImage
Sourcepub fn resource_icon(&self, ico: &str, p: bool) -> Option<IconData>
pub fn resource_icon(&self, ico: &str, p: bool) -> Option<IconData>
load resource icon
- ico: &str filename
- p: bool (true: self.basepath false: full path)
- result: Option eframe::IconData
Sourcepub fn resource_font(
&self,
fonts: &mut FontDefinitions,
n: &str,
f: &str,
t: FontFamily,
p: bool,
)
pub fn resource_font( &self, fonts: &mut FontDefinitions, n: &str, f: &str, t: FontFamily, p: bool, )
load resource font
- fonts: &mut FontDefinitions
- n: &str name
- f: &str filename
- t: FontFamily family (move)
- p: bool (true: self.basepath false: full path)
- result: ()
Sourcepub fn reg_fonts(&self, ffs: Vec<(&str, &str, FontFamily)>) -> FontDefinitions
pub fn reg_fonts(&self, ffs: Vec<(&str, &str, FontFamily)>) -> FontDefinitions
reg fonts
- ffs: Vec< (name, filename, family) > (move)
- result: FontDefinitions
Auto Trait Implementations§
impl Freeze for ResourcesBase
impl RefUnwindSafe for ResourcesBase
impl Send for ResourcesBase
impl Sync for ResourcesBase
impl Unpin for ResourcesBase
impl UnwindSafe for ResourcesBase
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> 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>
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