diff --git a/src/view/view_wrapper.rs b/src/view/view_wrapper.rs index bd3a20a..88c7f80 100644 --- a/src/view/view_wrapper.rs +++ b/src/view/view_wrapper.rs @@ -219,7 +219,7 @@ macro_rules! wrap_impl { /// } /// /// impl FooView { -/// inner_getters!(T); +/// inner_getters!(self.view: T); /// } /// /// impl ViewWrapper for FooView { @@ -229,7 +229,7 @@ macro_rules! wrap_impl { /// ``` #[macro_export] macro_rules! inner_getters { - ($t:ty) => { + (self.$v:ident: $t:ty) => { /// Gets access to the inner view. pub fn get_inner(&self) -> &$t { &self.view diff --git a/src/views/box_view.rs b/src/views/box_view.rs index 0ae1e06..6bcb65e 100644 --- a/src/views/box_view.rs +++ b/src/views/box_view.rs @@ -163,7 +163,7 @@ impl BoxView { ) } - inner_getters!(T); + inner_getters!(self.view: T); } impl ViewWrapper for BoxView { diff --git a/src/views/layer.rs b/src/views/layer.rs index 2152479..14ee200 100644 --- a/src/views/layer.rs +++ b/src/views/layer.rs @@ -17,7 +17,7 @@ impl Layer { Layer { view: view } } - inner_getters!(T); + inner_getters!(self.view: T); } impl ViewWrapper for Layer { diff --git a/src/views/on_event_view.rs b/src/views/on_event_view.rs index ae3495c..9d45166 100644 --- a/src/views/on_event_view.rs +++ b/src/views/on_event_view.rs @@ -204,7 +204,7 @@ impl OnEventView { ); } - inner_getters!(T); + inner_getters!(self.view: T); } impl ViewWrapper for OnEventView { diff --git a/src/views/panel.rs b/src/views/panel.rs index 243665d..07627fb 100644 --- a/src/views/panel.rs +++ b/src/views/panel.rs @@ -15,7 +15,7 @@ impl Panel { Panel { view: view } } - inner_getters!(V); + inner_getters!(self.view: V); } impl ViewWrapper for Panel { diff --git a/src/views/shadow_view.rs b/src/views/shadow_view.rs index 24bf9e5..a0f31cd 100644 --- a/src/views/shadow_view.rs +++ b/src/views/shadow_view.rs @@ -47,7 +47,7 @@ impl ShadowView { self } - inner_getters!(T); + inner_getters!(self.view: T); } impl ViewWrapper for ShadowView { diff --git a/src/views/sized_view.rs b/src/views/sized_view.rs index 287e01d..3d53b71 100644 --- a/src/views/sized_view.rs +++ b/src/views/sized_view.rs @@ -19,7 +19,7 @@ impl SizedView { } } - inner_getters!(T); + inner_getters!(self.view: T); } impl ViewWrapper for SizedView { diff --git a/src/views/tracked_view.rs b/src/views/tracked_view.rs index 2f9e01f..f44db47 100644 --- a/src/views/tracked_view.rs +++ b/src/views/tracked_view.rs @@ -18,7 +18,7 @@ impl TrackedView { self.offset.get() } - inner_getters!(T); + inner_getters!(self.view: T); } impl TrackedView {