Struct miniview::config::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }
Expand description
Builder to conveniently create a miniview configuration
Implementations§
source§impl ConfigBuilder
impl ConfigBuilder
sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Self
pub fn from_path<P: AsRef<Path>>(path: P) -> Self
Creates a builder from the provided path
Path should point to an image on the filesystem.
sourcepub fn source(self, value: Source) -> Self
pub fn source(self, value: Source) -> Self
Source of the image to be shown by the window. Can be a path or raw bytes imported from the stdin pipe
sourcepub fn set_fullscreen(self, value: bool) -> Self
pub fn set_fullscreen(self, value: bool) -> Self
Activates fullscreen mode
sourcepub fn allow_resizable_window(self, value: bool) -> Self
pub fn allow_resizable_window(self, value: bool) -> Self
Allow window resizing
Note: Upon resizing of the window, the image itself is not resized Note: Fullscreen mode implies window resizing
sourcepub fn set_lazy_window(self, value: bool) -> Self
pub fn set_lazy_window(self, value: bool) -> Self
Lazily update the window
Warning: if the window uses lazy updates, events may not work as expected (input events are is required to poll successive window events in lazy window mode).
sourcepub fn window_name(self, value: &'static str) -> Self
pub fn window_name(self, value: &'static str) -> Self
Title of the window; useful when trying to capture the window from another program.