From 0ed30ebbd083a41a2977c090b436801f55172f0a Mon Sep 17 00:00:00 2001 From: kl-botsu Date: Sun, 19 Nov 2023 22:42:04 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20khonsula?= =?UTF-8?q?bs/gooey@9be92c181c2023cdd566af231bef44fbb087e019=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/gooey/context/index.html | 2 +- main/gooey/context/struct.EventContext.html | 58 +++++++-------- .../gooey/context/struct.GraphicsContext.html | 66 ++++++++--------- main/gooey/context/struct.LayoutContext.html | 72 +++++++++---------- main/gooey/context/struct.WidgetCacheKey.html | 6 +- main/gooey/context/struct.WidgetContext.html | 58 +++++++-------- main/gooey/context/trait.AsEventContext.html | 10 +-- main/gooey/context/trait.ManageWidget.html | 8 +-- .../gooey/context/trait.MapManagedWidget.html | 8 +-- main/gooey/widget/enum.WidgetRef.html | 4 +- main/gooey/widget/struct.ManagedWidget.html | 4 +- main/gooey/widget/struct.WidgetInstance.html | 4 +- main/src/gooey/context.rs.html | 6 +- 13 files changed, 154 insertions(+), 152 deletions(-) diff --git a/main/gooey/context/index.html b/main/gooey/context/index.html index 4160a1563..9e8826f55 100644 --- a/main/gooey/context/index.html +++ b/main/gooey/context/index.html @@ -1,2 +1,2 @@ -gooey::context - Rust

Module gooey::context

source ·
Expand description

Types that provide access to the Gooey runtime.

+gooey::context - Rust

Module gooey::context

source ·
Expand description

Types that provide access to the Gooey runtime.

Structs

Enums

  • An owned T or an exclusive reference to a T.

Traits

\ No newline at end of file diff --git a/main/gooey/context/struct.EventContext.html b/main/gooey/context/struct.EventContext.html index 4d02e67af..5e25f1db0 100644 --- a/main/gooey/context/struct.EventContext.html +++ b/main/gooey/context/struct.EventContext.html @@ -64,70 +64,70 @@
source

pub fn return_focus(&mut self)

Returns the focus to the previous widget before this widget in the configured fous order.

To focus in the forward order, use EventContext::advance_focus().

-

Methods from Deref<Target = WidgetContext<'context, 'window>>§

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

-
source

pub fn for_other<'child, Widget>( +

Methods from Deref<Target = WidgetContext<'context, 'window>>§

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

+
source

pub fn for_other<'child, Widget>( &'child mut self, widget: &Widget ) -> <Widget::Managed as MapManagedWidget<WidgetContext<'child, 'window>>>::Resultwhere Widget: ManageWidget, Widget::Managed: MapManagedWidget<WidgetContext<'child, 'window>>,

Returns a new context representing widget.

-
source

pub fn enabled(&self) -> bool

Returns true if this widget is enabled.

-
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

-
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

+
source

pub fn enabled(&self) -> bool

Returns true if this widget is enabled.

+
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

+
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

+
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

Returns true if this function resulted in the focus being changed.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

+
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

Returns true if this function resulted in the currently active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

+
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

Returns true if this function resulted in the active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

-
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is +

source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

+
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is over a child widget.

-
source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

-
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

-
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

+
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

+
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user triggers a default action.

See MakeWidget::into_default() for more information.

-
source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user triggers an escape action.

See MakeWidget::into_escape() for more information.

-
source

pub fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

-
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

+
source

pub fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

+
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

Style queries for children will return any values matching this collection.

-
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

+
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

All children nodes will access this theme in their contexts.

-
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

+
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

All children nodes will use this theme mode.

-
source

pub fn get<Component: ComponentDefinition>( +

source

pub fn get<Component: ComponentDefinition>( &self, query: &Component ) -> Component::ComponentType

Queries the widget hierarchy for a single style component.

This function traverses up the widget hierarchy looking for the component being requested. If a matching component is found, it will be returned. Otherwise, the default value will be returned.

-
source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

-
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

-
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

-
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

-
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

-
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate +

source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

+
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

+
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

+
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

+
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

+
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate caches it stores.

Methods from Deref<Target = RunningWindow<'window>>§

source

pub fn focused(&self) -> &Dynamic<bool>

Returns a dynamic that is updated whenever this window’s focus status changes.

@@ -171,8 +171,8 @@

pub fn modifiers(&self) -> Modifiers

Returns currently active modifiers.

pub fn set_min_inner_size(&self, min_size: Option<Size<UPx>>)

Sets the window’s minimum inner size.

pub fn set_max_inner_size(&self, max_size: Option<Size<UPx>>)

Sets the window’s maximum inner size.

-

Trait Implementations§

source§

impl<'window> AsEventContext<'window> for EventContext<'_, 'window>

source§

fn as_event_context(&mut self) -> EventContext<'_, 'window>

Returns this context as an EventContext.
source§

fn push_child(&mut self, child: WidgetInstance) -> ManagedWidget

Pushes a new child widget into the widget hierarchy beneathq the -context’s widget.
source§

fn remove_child(&mut self, child: &ManagedWidget)

Removes a widget from the hierarchy.
source§

impl<'context, 'window> Deref for EventContext<'context, 'window>

§

type Target = WidgetContext<'context, 'window>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'context, 'window> DerefMut for EventContext<'context, 'window>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Drop for EventContext<'_, '_>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'context, 'window> !RefUnwindSafe for EventContext<'context, 'window>

§

impl<'context, 'window> Send for EventContext<'context, 'window>

§

impl<'context, 'window> !Sync for EventContext<'context, 'window>

§

impl<'context, 'window> Unpin for EventContext<'context, 'window>

§

impl<'context, 'window> !UnwindSafe for EventContext<'context, 'window>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere +

Trait Implementations§

source§

impl<'window> AsEventContext<'window> for EventContext<'_, 'window>

source§

fn as_event_context(&mut self) -> EventContext<'_, 'window>

Returns this context as an EventContext.
source§

fn push_child(&mut self, child: WidgetInstance) -> ManagedWidget

Pushes a new child widget into the widget hierarchy beneathq the +context’s widget.
source§

fn remove_child(&mut self, child: &ManagedWidget)

Removes a widget from the hierarchy.
source§

impl<'context, 'window> Deref for EventContext<'context, 'window>

§

type Target = WidgetContext<'context, 'window>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'context, 'window> DerefMut for EventContext<'context, 'window>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Drop for EventContext<'_, '_>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'context, 'window> !RefUnwindSafe for EventContext<'context, 'window>

§

impl<'context, 'window> Send for EventContext<'context, 'window>

§

impl<'context, 'window> !Sync for EventContext<'context, 'window>

§

impl<'context, 'window> Unpin for EventContext<'context, 'window>

§

impl<'context, 'window> !UnwindSafe for EventContext<'context, 'window>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, diff --git a/main/gooey/context/struct.GraphicsContext.html b/main/gooey/context/struct.GraphicsContext.html index 9a8a66a1a..0fd038763 100644 --- a/main/gooey/context/struct.GraphicsContext.html +++ b/main/gooey/context/struct.GraphicsContext.html @@ -6,7 +6,7 @@

§gfx: Exclusive<'context, Graphics<'clip, 'gfx, 'pass>>

The graphics context clipped and offset to the area of the widget being rendered. Drawing at 0,0 will draw at the top-left pixel of the laid-out widget region.

-

Implementations§

source§

impl<'context, 'window, 'clip, 'gfx, 'pass> GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

source

pub fn borrowed(&mut self) -> GraphicsContext<'_, 'window, 'clip, 'gfx, 'pass>

Returns a new instance that borrows from self.

+

Implementations§

source§

impl<'context, 'window, 'clip, 'gfx, 'pass> GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

source

pub fn borrowed(&mut self) -> GraphicsContext<'_, 'window, 'clip, 'gfx, 'pass>

Returns a new instance that borrows from self.

source

pub fn for_other<'child, Widget>( &'child mut self, widget: &Widget @@ -21,82 +21,82 @@

source

pub fn fill(&mut self, color: Color)

Fills the background of this widget with color, honoring the current CornerRadius setting.

If the alpha channel of color is 0, this function does nothing.

-
source

pub fn stroke_outline<Unit>( +

source

pub fn stroke_outline<Unit>( &mut self, color: Color, options: StrokeOptions<Unit> )where Unit: ScreenScale<Px = Px, Lp = Lp, UPx = UPx> + Zero,

Strokes an outline around this widget’s contents.

-
source

pub fn draw_focus_ring(&mut self)

Renders the default focus ring for this widget.

-
source

pub fn redraw(&mut self)

Invokes Widget::redraw() on this +

source

pub fn draw_focus_ring(&mut self)

Renders the default focus ring for this widget.

+
source

pub fn redraw(&mut self)

Invokes Widget::redraw() on this context’s widget.

Panics

This function panics if the widget being drawn has no layout set (via LayoutContext::set_child_layout()).

-

Methods from Deref<Target = WidgetContext<'context, 'window>>§

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

-
source

pub fn for_other<'child, Widget>( +

Methods from Deref<Target = WidgetContext<'context, 'window>>§

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

+
source

pub fn for_other<'child, Widget>( &'child mut self, widget: &Widget ) -> <Widget::Managed as MapManagedWidget<WidgetContext<'child, 'window>>>::Resultwhere Widget: ManageWidget, Widget::Managed: MapManagedWidget<WidgetContext<'child, 'window>>,

Returns a new context representing widget.

-
source

pub fn enabled(&self) -> bool

Returns true if this widget is enabled.

-
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

-
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

+
source

pub fn enabled(&self) -> bool

Returns true if this widget is enabled.

+
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

+
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

+
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

Returns true if this function resulted in the focus being changed.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

+
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

Returns true if this function resulted in the currently active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

+
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

Returns true if this function resulted in the active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

-
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is +

source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

+
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is over a child widget.

-
source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

-
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

-
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

+
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

+
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user triggers a default action.

See MakeWidget::into_default() for more information.

-
source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user triggers an escape action.

See MakeWidget::into_escape() for more information.

-
source

pub fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

-
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

+
source

pub fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

+
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

Style queries for children will return any values matching this collection.

-
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

+
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

All children nodes will access this theme in their contexts.

-
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

+
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

All children nodes will use this theme mode.

-
source

pub fn get<Component: ComponentDefinition>( +

source

pub fn get<Component: ComponentDefinition>( &self, query: &Component ) -> Component::ComponentType

Queries the widget hierarchy for a single style component.

This function traverses up the widget hierarchy looking for the component being requested. If a matching component is found, it will be returned. Otherwise, the default value will be returned.

-
source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

-
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

-
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

-
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

-
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

-
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate +

source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

+
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

+
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

+
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

+
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

+
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate caches it stores.

Methods from Deref<Target = RunningWindow<'window>>§

source

pub fn focused(&self) -> &Dynamic<bool>

Returns a dynamic that is updated whenever this window’s focus status changes.

@@ -140,8 +140,8 @@
Panics

pub fn modifiers(&self) -> Modifiers

Returns currently active modifiers.

pub fn set_min_inner_size(&self, min_size: Option<Size<UPx>>)

Sets the window’s minimum inner size.

pub fn set_max_inner_size(&self, max_size: Option<Size<UPx>>)

Sets the window’s maximum inner size.

-

Trait Implementations§

source§

impl<'window> AsEventContext<'window> for GraphicsContext<'_, 'window, '_, '_, '_>

source§

fn as_event_context(&mut self) -> EventContext<'_, 'window>

Returns this context as an EventContext.
source§

fn push_child(&mut self, child: WidgetInstance) -> ManagedWidget

Pushes a new child widget into the widget hierarchy beneathq the -context’s widget.
source§

fn remove_child(&mut self, child: &ManagedWidget)

Removes a widget from the hierarchy.
source§

impl<'context, 'window, 'clip, 'gfx, 'pass> Deref for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

type Target = WidgetContext<'context, 'window>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'context, 'window, 'clip, 'gfx, 'pass> DerefMut for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Drop for GraphicsContext<'_, '_, '_, '_, '_>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !RefUnwindSafe for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Send for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !Sync for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Unpin for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !UnwindSafe for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere +

Trait Implementations§

source§

impl<'window> AsEventContext<'window> for GraphicsContext<'_, 'window, '_, '_, '_>

source§

fn as_event_context(&mut self) -> EventContext<'_, 'window>

Returns this context as an EventContext.
source§

fn push_child(&mut self, child: WidgetInstance) -> ManagedWidget

Pushes a new child widget into the widget hierarchy beneathq the +context’s widget.
source§

fn remove_child(&mut self, child: &ManagedWidget)

Removes a widget from the hierarchy.
source§

impl<'context, 'window, 'clip, 'gfx, 'pass> Deref for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

type Target = WidgetContext<'context, 'window>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'context, 'window, 'clip, 'gfx, 'pass> DerefMut for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Drop for GraphicsContext<'_, '_, '_, '_, '_>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !RefUnwindSafe for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Send for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !Sync for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Unpin for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !UnwindSafe for GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, diff --git a/main/gooey/context/struct.LayoutContext.html b/main/gooey/context/struct.LayoutContext.html index e50890e55..1bf240790 100644 --- a/main/gooey/context/struct.LayoutContext.html +++ b/main/gooey/context/struct.LayoutContext.html @@ -1,24 +1,24 @@ -LayoutContext in gooey::context - Rust
pub struct LayoutContext<'context, 'window, 'clip, 'gfx, 'pass> {
+LayoutContext in gooey::context - Rust
pub struct LayoutContext<'context, 'window, 'clip, 'gfx, 'pass> {
     pub graphics: GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>,
     /* private fields */
 }
Expand description

A context to a function that is rendering a widget.

Fields§

§graphics: GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

The graphics context that this layout operation is being performed within.

-

Implementations§

source§

impl<'context, 'window, 'clip, 'gfx, 'pass> LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

source

pub fn as_temporary(self) -> Self

Returns a new layout context that does not persist any child layout +

Implementations§

source§

impl<'context, 'window, 'clip, 'gfx, 'pass> LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

source

pub fn as_temporary(self) -> Self

Returns a new layout context that does not persist any child layout operations.

This type of context is useful for asking widgets to measuree themselves in hypothetical layout conditions while trying to determine the best layout for a composite control.

-
source

pub fn for_other<'child, Widget>( +

source

pub fn for_other<'child, Widget>( &'child mut self, widget: &Widget ) -> <Widget::Managed as MapManagedWidget<LayoutContext<'child, 'window, 'child, 'gfx, 'pass>>>::Resultwhere Widget: ManageWidget, Widget::Managed: MapManagedWidget<LayoutContext<'child, 'window, 'child, 'gfx, 'pass>>,

Returns a new LayoutContext that allows invoking layout functions for widget.

-
source

pub fn layout(&mut self, available_space: Size<ConstraintLimit>) -> Size<UPx>

Invokes Widget::layout() on this +

source

pub fn layout(&mut self, available_space: Size<ConstraintLimit>) -> Size<UPx>

Invokes Widget::layout() on this context’s widget and returns the result.

-
source

pub fn set_child_layout(&mut self, child: &ManagedWidget, layout: Rect<Px>)

Sets the layout for child to layout.

+
source

pub fn set_child_layout(&mut self, child: &ManagedWidget, layout: Rect<Px>)

Sets the layout for child to layout.

layout is relative to the current widget’s controls.

Methods from Deref<Target = GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>>§

source

pub fn borrowed(&mut self) -> GraphicsContext<'_, 'window, 'clip, 'gfx, 'pass>

Returns a new instance that borrows from self.

source

pub fn for_other<'child, Widget>( @@ -35,82 +35,82 @@

source

pub fn fill(&mut self, color: Color)

Fills the background of this widget with color, honoring the current CornerRadius setting.

If the alpha channel of color is 0, this function does nothing.

-
source

pub fn stroke_outline<Unit>( +

source

pub fn stroke_outline<Unit>( &mut self, color: Color, options: StrokeOptions<Unit> )where Unit: ScreenScale<Px = Px, Lp = Lp, UPx = UPx> + Zero,

Strokes an outline around this widget’s contents.

-
source

pub fn draw_focus_ring(&mut self)

Renders the default focus ring for this widget.

-
source

pub fn redraw(&mut self)

Invokes Widget::redraw() on this +

source

pub fn draw_focus_ring(&mut self)

Renders the default focus ring for this widget.

+
source

pub fn redraw(&mut self)

Invokes Widget::redraw() on this context’s widget.

Panics

This function panics if the widget being drawn has no layout set (via LayoutContext::set_child_layout()).

-

Methods from Deref<Target = WidgetContext<'context, 'window>>§

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

-
source

pub fn for_other<'child, Widget>( +

Methods from Deref<Target = WidgetContext<'context, 'window>>§

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

+
source

pub fn for_other<'child, Widget>( &'child mut self, widget: &Widget ) -> <Widget::Managed as MapManagedWidget<WidgetContext<'child, 'window>>>::Resultwhere Widget: ManageWidget, Widget::Managed: MapManagedWidget<WidgetContext<'child, 'window>>,

Returns a new context representing widget.

-
source

pub fn enabled(&self) -> bool

Returns true if this widget is enabled.

-
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

-
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

+
source

pub fn enabled(&self) -> bool

Returns true if this widget is enabled.

+
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

+
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

+
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

Returns true if this function resulted in the focus being changed.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

+
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

Returns true if this function resulted in the currently active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

+
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

Returns true if this function resulted in the active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

-
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is +

source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

+
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is over a child widget.

-
source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

-
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

-
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

+
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

+
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user triggers a default action.

See MakeWidget::into_default() for more information.

-
source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user triggers an escape action.

See MakeWidget::into_escape() for more information.

-
source

pub fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

-
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

+
source

pub fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

+
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

Style queries for children will return any values matching this collection.

-
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

+
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

All children nodes will access this theme in their contexts.

-
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

+
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

All children nodes will use this theme mode.

-
source

pub fn get<Component: ComponentDefinition>( +

source

pub fn get<Component: ComponentDefinition>( &self, query: &Component ) -> Component::ComponentType

Queries the widget hierarchy for a single style component.

This function traverses up the widget hierarchy looking for the component being requested. If a matching component is found, it will be returned. Otherwise, the default value will be returned.

-
source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

-
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

-
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

-
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

-
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

-
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate +

source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

+
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

+
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

+
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

+
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

+
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate caches it stores.

Methods from Deref<Target = RunningWindow<'window>>§

source

pub fn focused(&self) -> &Dynamic<bool>

Returns a dynamic that is updated whenever this window’s focus status changes.

@@ -154,7 +154,7 @@
Panics

pub fn modifiers(&self) -> Modifiers

Returns currently active modifiers.

pub fn set_min_inner_size(&self, min_size: Option<Size<UPx>>)

Sets the window’s minimum inner size.

pub fn set_max_inner_size(&self, max_size: Option<Size<UPx>>)

Sets the window’s maximum inner size.

-

Trait Implementations§

source§

impl<'context, 'window, 'clip, 'gfx, 'pass> Deref for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

type Target = GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'context, 'window, 'clip, 'gfx, 'pass> DerefMut for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !RefUnwindSafe for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Send for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !Sync for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Unpin for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !UnwindSafe for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere +

Trait Implementations§

source§

impl<'context, 'window, 'clip, 'gfx, 'pass> Deref for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

type Target = GraphicsContext<'context, 'window, 'clip, 'gfx, 'pass>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'context, 'window, 'clip, 'gfx, 'pass> DerefMut for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !RefUnwindSafe for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Send for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !Sync for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> Unpin for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

§

impl<'context, 'window, 'clip, 'gfx, 'pass> !UnwindSafe for LayoutContext<'context, 'window, 'clip, 'gfx, 'pass>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, diff --git a/main/gooey/context/struct.WidgetCacheKey.html b/main/gooey/context/struct.WidgetCacheKey.html index 342da3d7b..b31139c7b 100644 --- a/main/gooey/context/struct.WidgetCacheKey.html +++ b/main/gooey/context/struct.WidgetCacheKey.html @@ -1,9 +1,9 @@ -WidgetCacheKey in gooey::context - Rust
pub struct WidgetCacheKey { /* private fields */ }
Expand description

An type that contains information about the state of a widget.

+WidgetCacheKey in gooey::context - Rust
pub struct WidgetCacheKey { /* private fields */ }
Expand description

An type that contains information about the state of a widget.

This value can be stored and compared in future widget events. If the cache keys are not equal, the widget should clear all caches.

-

Trait Implementations§

source§

impl Clone for WidgetCacheKey

source§

fn clone(&self) -> WidgetCacheKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WidgetCacheKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WidgetCacheKey

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq<WidgetCacheKey> for WidgetCacheKey

source§

fn eq(&self, other: &WidgetCacheKey) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl Clone for WidgetCacheKey

source§

fn clone(&self) -> WidgetCacheKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WidgetCacheKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WidgetCacheKey

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq<WidgetCacheKey> for WidgetCacheKey

source§

fn eq(&self, other: &WidgetCacheKey) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl Copy for WidgetCacheKey

source§

impl Eq for WidgetCacheKey

source§

impl StructuralEq for WidgetCacheKey

source§

impl StructuralPartialEq for WidgetCacheKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere +sufficient, and should not be overridden without very good reason.

source§

impl Copy for WidgetCacheKey

source§

impl Eq for WidgetCacheKey

source§

impl StructuralEq for WidgetCacheKey

source§

impl StructuralPartialEq for WidgetCacheKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, diff --git a/main/gooey/context/struct.WidgetContext.html b/main/gooey/context/struct.WidgetContext.html index b432e4664..4fdb4ee96 100644 --- a/main/gooey/context/struct.WidgetContext.html +++ b/main/gooey/context/struct.WidgetContext.html @@ -1,70 +1,70 @@ -WidgetContext in gooey::context - Rust
pub struct WidgetContext<'context, 'window> { /* private fields */ }
Expand description

A context for a widget.

+WidgetContext in gooey::context - Rust
pub struct WidgetContext<'context, 'window> { /* private fields */ }
Expand description

A context for a widget.

This type provides access to the widget hierarchy from the perspective of a specific widget.

-

Implementations§

source§

impl<'context, 'window> WidgetContext<'context, 'window>

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

-
source

pub fn for_other<'child, Widget>( +

Implementations§

source§

impl<'context, 'window> WidgetContext<'context, 'window>

source

pub fn borrowed(&mut self) -> WidgetContext<'_, 'window>

Returns a new instance that borrows from self.

+
source

pub fn for_other<'child, Widget>( &'child mut self, widget: &Widget ) -> <Widget::Managed as MapManagedWidget<WidgetContext<'child, 'window>>>::Resultwhere Widget: ManageWidget, Widget::Managed: MapManagedWidget<WidgetContext<'child, 'window>>,

Returns a new context representing widget.

-
source

pub const fn enabled(&self) -> bool

Returns true if this widget is enabled.

-
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

-
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

-
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

+
source

pub const fn enabled(&self) -> bool

Returns true if this widget is enabled.

+
source

pub fn redraw_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn invalidate_when_changed<T>(&self, value: &Dynamic<T>)

Ensures that this widget will be redrawn when value has been updated.

+
source

pub fn last_layout(&self) -> Option<Rect<Px>>

Returns the last layout of this widget.

+
source

pub fn focus(&mut self)

Sets the currently focused widget to this widget.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

+
source

pub fn blur(&mut self) -> bool

Clears focus from this widget, if it is the focused widget.

Returns true if this function resulted in the focus being changed.

Widget events relating to focus changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

+
source

pub fn activate(&mut self) -> bool

Activates this widget, if it is not already active.

Returns true if this function resulted in the currently active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

+
source

pub fn deactivate(&mut self) -> bool

Deactivates this widget, if it is the currently active widget.

Returns true if this function resulted in the active widget being changed.

Widget events relating to activation changes are deferred until after the all contexts for the currently firing event are dropped.

-
source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

-
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is +

source

pub fn active(&self) -> bool

Returns true if this widget is currently the active widget.

+
source

pub fn hovered(&self) -> bool

Returns true if this widget is currently hovered, even if the cursor is over a child widget.

-
source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

-
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

-
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn primary_hover(&self) -> bool

Returns true if this widget that is directly beneath the cursor.

+
source

pub fn focused(&self) -> bool

Returns true if this widget is currently focused for user input.

+
source

pub fn is_default(&self) -> bool

Returns true if this widget is the target to activate when the user triggers a default action.

See MakeWidget::into_default() for more information.

-
source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user +

source

pub fn is_escape(&self) -> bool

Returns true if this widget is the target to activate when the user triggers an escape action.

See MakeWidget::into_escape() for more information.

-
source

pub const fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

-
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

+
source

pub const fn widget(&self) -> &ManagedWidget

Returns the widget this context is for.

+
source

pub fn attach_styles(&self, styles: impl IntoValue<Styles>)

Attaches styles to the widget hierarchy for this widget.

Style queries for children will return any values matching this collection.

-
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

+
source

pub fn attach_theme(&self, theme: Value<ThemePair>)

Attaches theme to the widget hierarchy for this widget.

All children nodes will access this theme in their contexts.

-
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

+
source

pub fn attach_theme_mode(&self, theme_mode: Value<ThemeMode>)

Attaches theme_mode to the widget hierarchy for this widget.

All children nodes will use this theme mode.

-
source

pub fn get<Component: ComponentDefinition>( +

source

pub fn get<Component: ComponentDefinition>( &self, query: &Component ) -> Component::ComponentType

Queries the widget hierarchy for a single style component.

This function traverses up the widget hierarchy looking for the component being requested. If a matching component is found, it will be returned. Otherwise, the default value will be returned.

-
source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

-
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

-
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

-
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

-
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

-
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate +

source

pub fn window(&self) -> &RunningWindow<'window>

Returns the window containing this widget.

+
source

pub fn window_mut(&mut self) -> &mut RunningWindow<'window>

Returns an exclusive reference to the window containing this widget.

+
source

pub fn theme_pair(&self) -> &ThemePair

Returns the theme pair for the window.

+
source

pub fn theme(&self) -> &Theme

Returns the current theme in either light or dark mode.

+
source

pub fn inverse_theme(&self) -> &Theme

Returns the opposite theme of Self::theme().

+
source

pub fn cache_key(&self) -> WidgetCacheKey

Returns a key that can be checked to see if a widget should invalidate caches it stores.

Methods from Deref<Target = RunningWindow<'window>>§

source

pub fn focused(&self) -> &Dynamic<bool>

Returns a dynamic that is updated whenever this window’s focus status changes.

@@ -108,7 +108,7 @@

pub fn modifiers(&self) -> Modifiers

Returns currently active modifiers.

pub fn set_min_inner_size(&self, min_size: Option<Size<UPx>>)

Sets the window’s minimum inner size.

pub fn set_max_inner_size(&self, max_size: Option<Size<UPx>>)

Sets the window’s maximum inner size.

-

Trait Implementations§

source§

impl<'window> Deref for WidgetContext<'_, 'window>

§

type Target = RunningWindow<'window>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'window> DerefMut for WidgetContext<'_, 'window>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'context, 'window> !RefUnwindSafe for WidgetContext<'context, 'window>

§

impl<'context, 'window> Send for WidgetContext<'context, 'window>

§

impl<'context, 'window> !Sync for WidgetContext<'context, 'window>

§

impl<'context, 'window> Unpin for WidgetContext<'context, 'window>

§

impl<'context, 'window> !UnwindSafe for WidgetContext<'context, 'window>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere +

Trait Implementations§

source§

impl<'window> Deref for WidgetContext<'_, 'window>

§

type Target = RunningWindow<'window>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'window> DerefMut for WidgetContext<'_, 'window>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<'context, 'window> !RefUnwindSafe for WidgetContext<'context, 'window>

§

impl<'context, 'window> Send for WidgetContext<'context, 'window>

§

impl<'context, 'window> !Sync for WidgetContext<'context, 'window>

§

impl<'context, 'window> Unpin for WidgetContext<'context, 'window>

§

impl<'context, 'window> !UnwindSafe for WidgetContext<'context, 'window>

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, diff --git a/main/gooey/context/trait.AsEventContext.html b/main/gooey/context/trait.AsEventContext.html index 13515fbe9..2fbac34bf 100644 --- a/main/gooey/context/trait.AsEventContext.html +++ b/main/gooey/context/trait.AsEventContext.html @@ -1,4 +1,4 @@ -AsEventContext in gooey::context - Rust
pub trait AsEventContext<'window> {
+AsEventContext in gooey::context - Rust
pub trait AsEventContext<'window> {
     // Required method
     fn as_event_context(&mut self) -> EventContext<'_, 'window>;
 
@@ -6,8 +6,8 @@
     fn push_child(&mut self, child: WidgetInstance) -> ManagedWidget { ... }
     fn remove_child(&mut self, child: &ManagedWidget) { ... }
 }
Expand description

Converts from one context to an EventContext.

-

Required Methods§

source

fn as_event_context(&mut self) -> EventContext<'_, 'window>

Returns this context as an EventContext.

-

Provided Methods§

source

fn push_child(&mut self, child: WidgetInstance) -> ManagedWidget

Pushes a new child widget into the widget hierarchy beneathq the +

Required Methods§

source

fn as_event_context(&mut self) -> EventContext<'_, 'window>

Returns this context as an EventContext.

+

Provided Methods§

source

fn push_child(&mut self, child: WidgetInstance) -> ManagedWidget

Pushes a new child widget into the widget hierarchy beneathq the context’s widget.

-
source

fn remove_child(&mut self, child: &ManagedWidget)

Removes a widget from the hierarchy.

-

Implementors§

source§

impl<'window> AsEventContext<'window> for EventContext<'_, 'window>

source§

impl<'window> AsEventContext<'window> for GraphicsContext<'_, 'window, '_, '_, '_>

\ No newline at end of file +

source

fn remove_child(&mut self, child: &ManagedWidget)

Removes a widget from the hierarchy.

+

Implementors§

source§

impl<'window> AsEventContext<'window> for EventContext<'_, 'window>

source§

impl<'window> AsEventContext<'window> for GraphicsContext<'_, 'window, '_, '_, '_>

\ No newline at end of file diff --git a/main/gooey/context/trait.ManageWidget.html b/main/gooey/context/trait.ManageWidget.html index 1b89aa0e0..ded6141cb 100644 --- a/main/gooey/context/trait.ManageWidget.html +++ b/main/gooey/context/trait.ManageWidget.html @@ -1,10 +1,10 @@ -ManageWidget in gooey::context - Rust
pub trait ManageWidget {
+ManageWidget in gooey::context - Rust
pub trait ManageWidget {
     type Managed: MapManagedWidget<ManagedWidget>;
 
     // Required method
     fn manage(&self, context: &WidgetContext<'_, '_>) -> Self::Managed;
 }
Expand description

A type chat can convert to a ManagedWidget through a WidgetContext.

-

Required Associated Types§

source

type Managed: MapManagedWidget<ManagedWidget>

The managed type, which can be Option<ManagedWidget> or +

Required Associated Types§

source

type Managed: MapManagedWidget<ManagedWidget>

The managed type, which can be Option<ManagedWidget> or ManagedWidget.

-

Required Methods§

source

fn manage(&self, context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.

-

Implementors§

\ No newline at end of file +

Required Methods§

source

fn manage(&self, context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.

+

Implementors§

\ No newline at end of file diff --git a/main/gooey/context/trait.MapManagedWidget.html b/main/gooey/context/trait.MapManagedWidget.html index 862dd5a9e..3cf16d6f6 100644 --- a/main/gooey/context/trait.MapManagedWidget.html +++ b/main/gooey/context/trait.MapManagedWidget.html @@ -1,9 +1,9 @@ -MapManagedWidget in gooey::context - Rust
pub trait MapManagedWidget<T> {
+MapManagedWidget in gooey::context - Rust
pub trait MapManagedWidget<T> {
     type Result;
 
     // Required method
     fn map(self, map: impl FnOnce(ManagedWidget) -> T) -> Self::Result;
 }
Expand description

A type that can produce another type when provided a ManagedWidget.

-

Required Associated Types§

source

type Result

The result of the mapping operation.

-

Required Methods§

source

fn map(self, map: impl FnOnce(ManagedWidget) -> T) -> Self::Result

Call map with a ManagedWidget.

-

Implementations on Foreign Types§

source§

impl<T> MapManagedWidget<T> for Option<ManagedWidget>

§

type Result = Option<T>

source§

fn map(self, map: impl FnOnce(ManagedWidget) -> T) -> Self::Result

Implementors§

\ No newline at end of file +

Required Associated Types§

source

type Result

The result of the mapping operation.

+

Required Methods§

source

fn map(self, map: impl FnOnce(ManagedWidget) -> T) -> Self::Result

Call map with a ManagedWidget.

+

Implementations on Foreign Types§

source§

impl<T> MapManagedWidget<T> for Option<ManagedWidget>

§

type Result = Option<T>

source§

fn map(self, map: impl FnOnce(ManagedWidget) -> T) -> Self::Result

Implementors§

\ No newline at end of file diff --git a/main/gooey/widget/enum.WidgetRef.html b/main/gooey/widget/enum.WidgetRef.html index fcd1931c9..3565f8173 100644 --- a/main/gooey/widget/enum.WidgetRef.html +++ b/main/gooey/widget/enum.WidgetRef.html @@ -7,8 +7,8 @@

Implementations§

source§

impl WidgetRef

source

pub fn new(widget: impl MakeWidget) -> Self

Returns a new unmounted child

source

pub fn mounted(&mut self, context: &mut EventContext<'_, '_>) -> ManagedWidget

Returns this child, mounting it in the process if necessary.

source

pub fn widget(&self) -> &WidgetInstance

Returns the a reference to the underlying widget instance.

-

Trait Implementations§

source§

impl AsMut<WidgetRef> for Align

source§

fn as_mut(&mut self) -> &mut WidgetRef

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<WidgetId> for WidgetRef

source§

fn as_ref(&self) -> &WidgetId

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for WidgetRef

source§

fn clone(&self) -> WidgetRef

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WidgetRef

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ManageWidget for WidgetRef

§

type Managed = Option<ManagedWidget>

The managed type, which can be Option<ManagedWidget> or -ManagedWidget.
source§

fn manage(&self, context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere +

Trait Implementations§

source§

impl AsMut<WidgetRef> for Align

source§

fn as_mut(&mut self) -> &mut WidgetRef

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<WidgetId> for WidgetRef

source§

fn as_ref(&self) -> &WidgetId

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for WidgetRef

source§

fn clone(&self) -> WidgetRef

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WidgetRef

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ManageWidget for WidgetRef

§

type Managed = Option<ManagedWidget>

The managed type, which can be Option<ManagedWidget> or +ManagedWidget.
source§

fn manage(&self, context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, diff --git a/main/gooey/widget/struct.ManagedWidget.html b/main/gooey/widget/struct.ManagedWidget.html index fddee520e..e0bd98a38 100644 --- a/main/gooey/widget/struct.ManagedWidget.html +++ b/main/gooey/widget/struct.ManagedWidget.html @@ -20,8 +20,8 @@

source

pub fn focused(&self) -> bool

Returns true if this widget is the currently focused widget.

source

pub fn parent(&self) -> Option<ManagedWidget>

Returns the parent of this widget.

source

pub fn has_parent(&self) -> bool

Returns true if this node has a parent.

-

Trait Implementations§

source§

impl AsRef<WidgetId> for ManagedWidget

source§

fn as_ref(&self) -> &WidgetId

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for ManagedWidget

source§

fn clone(&self) -> ManagedWidget

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ManagedWidget

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ManageWidget for ManagedWidget

§

type Managed = ManagedWidget

The managed type, which can be Option<ManagedWidget> or -ManagedWidget.
source§

fn manage(&self, _context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.
source§

impl<T> MapManagedWidget<T> for ManagedWidget

§

type Result = T

The result of the mapping operation.
source§

fn map(self, map: impl FnOnce(ManagedWidget) -> T) -> Self::Result

Call map with a ManagedWidget.
source§

impl PartialEq<ManagedWidget> for ManagedWidget

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

source§

impl AsRef<WidgetId> for ManagedWidget

source§

fn as_ref(&self) -> &WidgetId

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for ManagedWidget

source§

fn clone(&self) -> ManagedWidget

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ManagedWidget

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ManageWidget for ManagedWidget

§

type Managed = ManagedWidget

The managed type, which can be Option<ManagedWidget> or +ManagedWidget.
source§

fn manage(&self, _context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.
source§

impl<T> MapManagedWidget<T> for ManagedWidget

§

type Result = T

The result of the mapping operation.
source§

fn map(self, map: impl FnOnce(ManagedWidget) -> T) -> Self::Result

Call map with a ManagedWidget.
source§

impl PartialEq<ManagedWidget> for ManagedWidget

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<WidgetInstance> for ManagedWidget

source§

fn eq(&self, other: &WidgetInstance) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always diff --git a/main/gooey/widget/struct.WidgetInstance.html b/main/gooey/widget/struct.WidgetInstance.html index 4ae5d4f35..7f6a8edc0 100644 --- a/main/gooey/widget/struct.WidgetInstance.html +++ b/main/gooey/widget/struct.WidgetInstance.html @@ -63,8 +63,8 @@
Panics
next_focus: impl IntoValue<Option<WidgetId>> ) -> WidgetInstance
Sets the widget that should be focused next. Read more
source§

fn with_enabled(self, enabled: impl IntoValue<bool>) -> WidgetInstance

Sets this widget to be enabled/disabled based on enabled and returns self. Read more
source§

fn into_default(self) -> WidgetInstance

Sets this widget as a “default” widget. Read more
source§

fn into_escape(self) -> WidgetInstance

Sets this widget as an “escape” widget. Read more
source§

fn and(self, other: impl MakeWidget) -> Children

Returns a collection of widgets using self and other.
source§

fn expand(self) -> Expand

Expands self to grow to fill its parent.
source§

fn expand_weighted(self, weight: u8) -> Expand

Expands self to grow to fill its parent proportionally with other -weighted siblings.
source§

fn expand_horizontally(self) -> Expand

Expands self to grow to fill its parent horizontally.
source§

fn expand_vertically(self) -> Expand

Expands self to grow to fill its parent vertically.
source§

fn width(self, width: impl Into<DimensionRange>) -> Resize

Resizes self to width. Read more
source§

fn height(self, height: impl Into<DimensionRange>) -> Resize

Resizes self to height. Read more
source§

fn into_button(self) -> Button

Returns this string as a clickable button.
source§

fn centered(self) -> Align

Aligns self to the center vertically and horizontally.
source§

fn align_left(self) -> Align

Aligns self to the left.
source§

fn align_right(self) -> Align

Aligns self to the right.
source§

fn align_top(self) -> Align

Aligns self to the top.
source§

fn align_bottom(self) -> Align

Aligns self to the bottom.
source§

fn fit_horizontally(self) -> Align

Fits self horizontally within its parent.
source§

fn fit_vertically(self) -> Align

Fits self vertically within its parent.
source§

fn scroll(self) -> Scroll

Allows scrolling self both vertically and horizontally.
source§

fn vertical_scroll(self) -> Scroll

Allows scrolling self vertically.
source§

fn horizontal_scroll(self) -> Scroll

Allows scrolling self horizontally.
source§

fn widget_ref(self) -> WidgetRef

Creates a WidgetRef for use as child widget.
source§

fn contain(self) -> Container

Wraps self in a Container.
source§

fn contain_level(self, level: impl IntoValue<ContainerLevel>) -> Container

Wraps self in a Container with the specified level.
source§

fn background_color(self, color: impl IntoValue<Color>) -> Container

Returns a new widget that renders color behind self.
source§

fn pad(self) -> Container

Wraps self with the default padding.
source§

fn pad_by(self, padding: impl IntoValue<Edges<Dimension>>) -> Container

Wraps self with the specified padding.
source§

fn themed(self, theme: impl IntoValue<ThemePair>) -> Themed

Applies theme to self and its children.
source§

fn themed_mode(self, mode: impl IntoValue<ThemeMode>) -> ThemedMode

Applies mode to self and its children.
source§

impl ManageWidget for WidgetInstance

§

type Managed = Option<ManagedWidget>

The managed type, which can be Option<ManagedWidget> or -ManagedWidget.
source§

fn manage(&self, context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.
source§

impl PartialEq<WidgetInstance> for ManagedWidget

source§

fn eq(&self, other: &WidgetInstance) -> bool

This method tests for self and other values to be equal, and is used +weighted siblings.
source§

fn expand_horizontally(self) -> Expand

Expands self to grow to fill its parent horizontally.
source§

fn expand_vertically(self) -> Expand

Expands self to grow to fill its parent vertically.
source§

fn width(self, width: impl Into<DimensionRange>) -> Resize

Resizes self to width. Read more
source§

fn height(self, height: impl Into<DimensionRange>) -> Resize

Resizes self to height. Read more
source§

fn into_button(self) -> Button

Returns this string as a clickable button.
source§

fn centered(self) -> Align

Aligns self to the center vertically and horizontally.
source§

fn align_left(self) -> Align

Aligns self to the left.
source§

fn align_right(self) -> Align

Aligns self to the right.
source§

fn align_top(self) -> Align

Aligns self to the top.
source§

fn align_bottom(self) -> Align

Aligns self to the bottom.
source§

fn fit_horizontally(self) -> Align

Fits self horizontally within its parent.
source§

fn fit_vertically(self) -> Align

Fits self vertically within its parent.
source§

fn scroll(self) -> Scroll

Allows scrolling self both vertically and horizontally.
source§

fn vertical_scroll(self) -> Scroll

Allows scrolling self vertically.
source§

fn horizontal_scroll(self) -> Scroll

Allows scrolling self horizontally.
source§

fn widget_ref(self) -> WidgetRef

Creates a WidgetRef for use as child widget.
source§

fn contain(self) -> Container

Wraps self in a Container.
source§

fn contain_level(self, level: impl IntoValue<ContainerLevel>) -> Container

Wraps self in a Container with the specified level.
source§

fn background_color(self, color: impl IntoValue<Color>) -> Container

Returns a new widget that renders color behind self.
source§

fn pad(self) -> Container

Wraps self with the default padding.
source§

fn pad_by(self, padding: impl IntoValue<Edges<Dimension>>) -> Container

Wraps self with the specified padding.
source§

fn themed(self, theme: impl IntoValue<ThemePair>) -> Themed

Applies theme to self and its children.
source§

fn themed_mode(self, mode: impl IntoValue<ThemeMode>) -> ThemedMode

Applies mode to self and its children.
source§

impl ManageWidget for WidgetInstance

§

type Managed = Option<ManagedWidget>

The managed type, which can be Option<ManagedWidget> or +ManagedWidget.
source§

fn manage(&self, context: &WidgetContext<'_, '_>) -> Self::Managed

Resolve self into a ManagedWidget.
source§

impl PartialEq<WidgetInstance> for ManagedWidget

source§

fn eq(&self, other: &WidgetInstance) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<WidgetInstance> for WidgetInstance

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always diff --git a/main/src/gooey/context.rs.html b/main/src/gooey/context.rs.html index da9ed38d9..989d09209 100644 --- a/main/src/gooey/context.rs.html +++ b/main/src/gooey/context.rs.html @@ -1308,6 +1308,7 @@ 1308 1309 1310 +1311
//! Types that provide access to the Gooey runtime.
 use std::borrow::Cow;
 use std::hash::Hash;
@@ -1320,7 +1321,7 @@
     DeviceId, Ime, KeyEvent, MouseButton, MouseScrollDelta, TouchPhase,
 };
 use kludgine::figures::units::{Lp, Px, UPx};
-use kludgine::figures::{IntoSigned, Point, Px2D, Rect, ScreenScale, Size, Zero};
+use kludgine::figures::{IntoSigned, Point, Px2D, Rect, Round, ScreenScale, Size, Zero};
 use kludgine::shapes::{Shape, StrokeOptions};
 use kludgine::{Color, Kludgine};
 
@@ -1855,7 +1856,8 @@
         Unit: ScreenScale<Px = Px, Lp = Lp, UPx = UPx> + Zero,
     {
         if color.alpha() > 0 {
-            let options = options.colored(color).into_px(self.gfx.scale());
+            let mut options = options.colored(color).into_px(self.gfx.scale());
+            options.line_width = options.line_width.round();
             let inset = options.line_width / 2;
             let visible_rect = Rect::new(
                 Point::squared(inset),