MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / layout

Method layout

src/plot_overlay.rs:183–199  ·  view source on GitHub ↗
(
        &mut self,
        tree: &mut Tree,
        renderer: &iced::Renderer,
        limits: &layout::Limits,
    )

Source from the content-addressed store, hash-verified

181 }
182
183 fn layout(
184 &mut self,
185 tree: &mut Tree,
186 renderer: &iced::Renderer,
187 limits: &layout::Limits,
188 ) -> layout::Node {
189 let limits = limits.width(Length::Fill).height(Length::Fill);
190 let size = limits.resolve(Length::Fill, Length::Fill, iced::Size::ZERO);
191 let child_limits = layout::Limits::new(iced::Size::ZERO, size);
192 let child = self
193 .content
194 .as_widget_mut()
195 .layout(tree, renderer, &child_limits);
196 let position = self.content_position(child.size());
197
198 layout::Node::with_children(size, vec![child.move_to(position)])
199 }
200
201 fn operate(
202 &mut self,

Callers

nothing calls this directly

Calls 3

content_positionMethod · 0.80
sizeMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected