mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +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> {
|
||||
/// inner_getters!(T);
|
||||
/// inner_getters!(self.view: T);
|
||||
/// }
|
||||
///
|
||||
/// impl <T: View> ViewWrapper for FooView<T> {
|
||||
@ -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
|
||||
|
@ -163,7 +163,7 @@ impl<T: View> BoxView<T> {
|
||||
)
|
||||
}
|
||||
|
||||
inner_getters!(T);
|
||||
inner_getters!(self.view: T);
|
||||
}
|
||||
|
||||
impl<T: View> ViewWrapper for BoxView<T> {
|
||||
|
@ -17,7 +17,7 @@ impl<T: View> Layer<T> {
|
||||
Layer { view: view }
|
||||
}
|
||||
|
||||
inner_getters!(T);
|
||||
inner_getters!(self.view: 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> {
|
||||
|
@ -15,7 +15,7 @@ impl<V: View> Panel<V> {
|
||||
Panel { view: view }
|
||||
}
|
||||
|
||||
inner_getters!(V);
|
||||
inner_getters!(self.view: V);
|
||||
}
|
||||
|
||||
impl<V: View> ViewWrapper for Panel<V> {
|
||||
|
@ -47,7 +47,7 @@ impl<T: View> ShadowView<T> {
|
||||
self
|
||||
}
|
||||
|
||||
inner_getters!(T);
|
||||
inner_getters!(self.view: 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> {
|
||||
|
@ -18,7 +18,7 @@ impl<T: View> TrackedView<T> {
|
||||
self.offset.get()
|
||||
}
|
||||
|
||||
inner_getters!(T);
|
||||
inner_getters!(self.view: T);
|
||||
}
|
||||
|
||||
impl<T: View> TrackedView<T> {
|
||||
|
Loading…
Reference in New Issue
Block a user