From 2ab81ae6c90294a0c38a9ebcc62f3ce2bc749aa8 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Thu, 20 Dec 2018 13:39:49 -0800 Subject: [PATCH] Add HideableView::is_visible --- src/views/hideable_view.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/hideable_view.rs b/src/views/hideable_view.rs index f53f8ca..3e624cf 100644 --- a/src/views/hideable_view.rs +++ b/src/views/hideable_view.rs @@ -53,6 +53,11 @@ impl HideableView { self.with(Self::hide) } + /// Returns `true` if the wrapped view is going to be visible. + pub fn is_visible(&self) -> bool { + self.visible + } + fn invalidate(&mut self) { self.invalidated = true; }