Mercurial > gui
diff togglePanel.ur @ 28:7d0014542199
TogglePanel.isOpen
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 12 Feb 2012 10:27:02 -0500 |
parents | 5905b56e0cd9 |
children | b5432d74841a |
line wrap: on
line diff
--- a/togglePanel.ur Tue Dec 20 21:04:21 2011 -0500 +++ b/togglePanel.ur Sun Feb 12 10:27:02 2012 -0500 @@ -54,3 +54,9 @@ end fun gui_togglePanel [t ::: Type] [ctx ::: {Unit}] (g : gui t ctx) = mkGui (@render g) + +fun isOpen [t] [ctx] (t : togglePanel t ctx) = + v <- signal t.PanelState; + return (case v of + Open => True + | Closed => False)