mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-24 01:46:31 +00:00
Replace inner_getters!(T); with inner_getters!(self.view: T);
This commit is contained in:
parent
b21280c106
commit
5bfe9548e8
@ -219,7 +219,7 @@ macro_rules! wrap_impl {
|
|||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// impl<T: View> FooView<T> {
|
/// impl<T: View> FooView<T> {
|
||||||
/// inner_getters!(T);
|
/// inner_getters!(self.view: T);
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// impl <T: View> ViewWrapper for FooView<T> {
|
/// impl <T: View> ViewWrapper for FooView<T> {
|
||||||
@ -229,7 +229,7 @@ macro_rules! wrap_impl {
|
|||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! inner_getters {
|
macro_rules! inner_getters {
|
||||||
($t:ty) => {
|
(self.$v:ident: $t:ty) => {
|
||||||
/// Gets access to the inner view.
|
/// Gets access to the inner view.
|
||||||
pub fn get_inner(&self) -> &$t {
|
pub fn get_inner(&self) -> &$t {
|
||||||
&self.view
|
&self.view
|
||||||
|
@ -163,7 +163,7 @@ impl<T: View> BoxView<T> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
inner_getters!(T);
|
inner_getters!(self.view: T);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: View> ViewWrapper for BoxView<T> {
|
impl<T: View> ViewWrapper for BoxView<T> {
|
||||||
|
@ -17,7 +17,7 @@ impl<T: View> Layer<T> {
|
|||||||
Layer { view: view }
|
Layer { view: view }
|
||||||
}
|
}
|
||||||
|
|
||||||
inner_getters!(T);
|
inner_getters!(self.view: T);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: View> ViewWrapper for Layer<T> {
|
impl<T: View> ViewWrapper for Layer<T> {
|
||||||
|
@ -204,7 +204,7 @@ impl<T: View> OnEventView<T> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
inner_getters!(T);
|
inner_getters!(self.view: T);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: View> ViewWrapper for OnEventView<T> {
|
impl<T: View> ViewWrapper for OnEventView<T> {
|
||||||
|
@ -15,7 +15,7 @@ impl<V: View> Panel<V> {
|
|||||||
Panel { view: view }
|
Panel { view: view }
|
||||||
}
|
}
|
||||||
|
|
||||||
inner_getters!(V);
|
inner_getters!(self.view: V);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<V: View> ViewWrapper for Panel<V> {
|
impl<V: View> ViewWrapper for Panel<V> {
|
||||||
|
@ -47,7 +47,7 @@ impl<T: View> ShadowView<T> {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
inner_getters!(T);
|
inner_getters!(self.view: T);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: View> ViewWrapper for ShadowView<T> {
|
impl<T: View> ViewWrapper for ShadowView<T> {
|
||||||
|
@ -19,7 +19,7 @@ impl<T: View> SizedView<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inner_getters!(T);
|
inner_getters!(self.view: T);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: View> ViewWrapper for SizedView<T> {
|
impl<T: View> ViewWrapper for SizedView<T> {
|
||||||
|
@ -18,7 +18,7 @@ impl<T: View> TrackedView<T> {
|
|||||||
self.offset.get()
|
self.offset.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
inner_getters!(T);
|
inner_getters!(self.view: T);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: View> TrackedView<T> {
|
impl<T: View> TrackedView<T> {
|
||||||
|
Loading…
Reference in New Issue
Block a user