pub struct MapSettings {
pub max_zoom: f32,
pub min_zoom: f32,
pub line_visible_zoom: f32,
pub label_visible_zoom: f32,
pub node_text_visibility: VisibilitySetting,
pub styles: Vec<MapStyle>,
}Expand description
Configuration of a Map widget.
MapSettings::default() provides sensible zoom limits plus a light and a
dark theme; the widget picks the style to apply based on
egui::Visuals::dark_mode, using styles[0] in light mode and
styles[1] in dark mode.
Fields§
§max_zoom: f32Maximum zoom factor.
min_zoom: f32Minimum zoom factor.
line_visible_zoom: f32Zoom threshold above which connection lines become visible.
label_visible_zoom: f32Zoom threshold above which node names become visible when
node_text_visibility is
VisibilitySetting::Allways.
node_text_visibility: VisibilitySettingControls when node names are displayed.
styles: Vec<MapStyle>Per-theme styles; index 0 is used in light mode, index 1 in dark
mode.
Implementations§
Source§impl MapSettings
impl MapSettings
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates settings with all zoom thresholds set to 0.0 and a single
transparent style.
Prefer MapSettings::default() unless you really need to build the
configuration from scratch.
Trait Implementations§
Source§impl Clone for MapSettings
impl Clone for MapSettings
Source§fn clone(&self) -> MapSettings
fn clone(&self) -> MapSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MapSettings
impl Debug for MapSettings
Auto Trait Implementations§
impl Freeze for MapSettings
impl RefUnwindSafe for MapSettings
impl Send for MapSettings
impl Sync for MapSettings
impl Unpin for MapSettings
impl UnsafeUnpin for MapSettings
impl UnwindSafe for MapSettings
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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