summaryrefslogtreecommitdiffstats
path: root/graphics/src/widget/canvas/program.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-11-26 02:52:34 +0100
committerLibravatar GitHub <noreply@github.com>2020-11-26 02:52:34 +0100
commit1f7e8b7f3d1804c39c8e0934b25f3ef178de269c (patch)
tree380d9224b81537e460ea7f9fe84c0c912d3f4cbf /graphics/src/widget/canvas/program.rs
parentbffaeed9fd44619491c012cd9270043828c1849c (diff)
parent01322f69a406eee76014f5e2834336e2295ad80e (diff)
downloadiced-1f7e8b7f3d1804c39c8e0934b25f3ef178de269c.tar.gz
iced-1f7e8b7f3d1804c39c8e0934b25f3ef178de269c.tar.bz2
iced-1f7e8b7f3d1804c39c8e0934b25f3ef178de269c.zip
Merge pull request #632 from hecrj/improvement/update-docs
Use intra-doc links
Diffstat (limited to 'graphics/src/widget/canvas/program.rs')
-rw-r--r--graphics/src/widget/canvas/program.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/graphics/src/widget/canvas/program.rs b/graphics/src/widget/canvas/program.rs
index e8f43380..d703caad 100644
--- a/graphics/src/widget/canvas/program.rs
+++ b/graphics/src/widget/canvas/program.rs
@@ -7,8 +7,7 @@ use iced_native::{mouse, Rectangle};
/// A [`Program`] can mutate internal state and produce messages for an
/// application.
///
-/// [`Canvas`]: struct.Canvas.html
-/// [`Program`]: trait.Program.html
+/// [`Canvas`]: crate::widget::Canvas
pub trait Program<Message> {
/// Updates the state of the [`Program`].
///
@@ -20,9 +19,7 @@ pub trait Program<Message> {
///
/// By default, this method does and returns nothing.
///
- /// [`Program`]: trait.Program.html
- /// [`Canvas`]: struct.Canvas.html
- /// [`Event`]: enum.Event.html
+ /// [`Canvas`]: crate::widget::Canvas
fn update(
&mut self,
_event: Event,
@@ -37,10 +34,8 @@ pub trait Program<Message> {
/// [`Geometry`] can be easily generated with a [`Frame`] or stored in a
/// [`Cache`].
///
- /// [`Program`]: trait.Program.html
- /// [`Geometry`]: struct.Geometry.html
- /// [`Frame`]: struct.Frame.html
- /// [`Cache`]: struct.Cache.html
+ /// [`Frame`]: crate::widget::canvas::Cache
+ /// [`Cache`]: crate::widget::canvas::Cache
fn draw(&self, bounds: Rectangle, cursor: Cursor) -> Vec<Geometry>;
/// Returns the current mouse interaction of the [`Program`].
@@ -48,8 +43,7 @@ pub trait Program<Message> {
/// The interaction returned will be in effect even if the cursor position
/// is out of bounds of the program's [`Canvas`].
///
- /// [`Program`]: trait.Program.html
- /// [`Canvas`]: struct.Canvas.html
+ /// [`Canvas`]: crate::widget::Canvas
fn mouse_interaction(
&self,
_bounds: Rectangle,