|
| Graphics.UI.Phooey.Monad | | Portability | portable | | Stability | provisional | | Maintainer | conal@conal.net |
|
|
|
|
|
| Description |
| A functional UI monad. Uses explicit data-driven "sources" of
values. Supports recursive GUIs. See
http://haskell.org/haskellwiki/Phooey#Monadic_Interface.
|
|
| Synopsis |
|
| type CxLayout = CxMonoid Layout | | | type UI = ReaderT Win (WriterT CxLayout (WriterT (Source Action) IO)) | | | type UI' a = Win -> IO ((a, CxLayout), Source Action) | | | biUI :: UI' a :<->: UI a | | | inUI :: (UI' a -> UI' b) -> (UI a -> UI b) | | | toUI :: UI' a -> UI a | | | fromUI :: UI b -> UI' b | | | type UIE a = UI (Event a) | | | type UIS a = UI (Source a) | | | runUI :: UI () -> IO () | | | runNamedUI :: String -> UI () -> IO () | | | act :: UI (Source Action) -> UI () | | | type IWidget a = a -> UI (Source a) | | | type OWidget a = Source a -> UI () | | | type OWidget' a = UI (Sink a) | | | type IOWidget a = (IWidget a, OWidget a, OWidget' a) | | | type MkWidget ctl a b = Unop Layout -> (Win -> [Prop ctl] -> IO ctl) -> Attr ctl a -> b | | | widgetL :: Widget w => Unop Layout -> w -> CxLayout | | | iwidget :: (Commanding ctl, Widget ctl) => MkWidget ctl a (IWidget a) | | | iwidget' :: Widget ctl => Event ctl (IO ()) -> MkWidget ctl a (IWidget a) | | | owidget :: Widget widget => MkWidget widget a (OWidget a) | | | owidget' :: Widget ctl => MkWidget ctl a (OWidget' a) | | | iowidget :: (Commanding widget, Widget widget) => MkWidget widget a (IOWidget a) | | | testWidget :: WioS a -> UI (Source a) | | | stringEntry :: IWidget String | | | stringDisplay :: OWidget String | | | stringDisplay' :: OWidget' String | | | showDisplay :: Show a => OWidget a | | | showDisplay' :: Show a => OWidget' a | | | islider :: (Int, Int) -> IWidget Int | | | isliderDisplay :: (Int, Int) -> OWidget Int | | | isliderDisplay' :: (Int, Int) -> OWidget' Int | | | fslider :: forall a. RealFrac a => (a, a) -> IWidget a | | | fsliderDisplay :: forall a. RealFrac a => (a, a) -> OWidget a | | | fsliderDisplay' :: forall a. RealFrac a => (a, a) -> OWidget' a | | | checkBoxEntry :: IWidget Bool | | | checkBoxDisplay :: OWidget Bool | | | checkBoxDisplay' :: OWidget' Bool | | | button :: a -> String -> UI (Event a) | | | button' :: a -> [Prop (Button ())] -> UI (Event a) | | | smallButton :: a -> String -> UI (Event a) | | | choices :: [String] -> IWidget String | | | timedPoll :: Double -> IO a -> UI (Source a) | | | fromTop :: Unop (UI a) | | | fromBottom :: Unop (UI a) | | | fromLeft :: Unop (UI a) | | | fromRight :: Unop (UI a) |
|
|
|
| The UI monad
|
|
|
| Context-dependent layout
|
|
|
| The UI monad
|
|
|
| Convenient variation of UI
|
|
|
| Bijection for convenient manipulation.
|
|
|
| Apply a unary function inside the UI representation.
|
|
|
| Make from representation
|
|
|
| Extract representation
|
|
|
| Event-valued UI
|
|
|
| Source-valued UI
|
|
|
| Run a UI with window title "Monadic Phooey GUI".
|
|
|
| Run a UI with given window title.
|
|
|
| Move an action source into position to be executed
|
|
| Tools for high-level widgets
|
|
|
| Input widget type (with initial value)
|
|
|
| Output widget type
|
|
|
| Alternative output widget type
|
|
|
| Combine input & output widget types
|
|
|
| Utility type for making widgets
|
|
|
|
|
| Make an input widget. See alos 'iwidget\''.
|
|
|
| Make an input widget with a given update event. If the update is
commanding you can use iwidget.
|
|
|
| Make a high-level output widget
|
|
|
| Output widget, alternative style
|
|
|
| Convenience function combining iwidget, owidget, and 'owidget\''
|
|
|
| For testing out WinEvents
|
|
| Some high-level widgets
|
|
|
| String input widget
|
|
|
| String output widget
|
|
|
| Alternative string output widget
|
|
|
| Showable output widget
|
|
|
| Alternative showable output
|
|
|
| Slider input widget
|
|
|
| Slider output widget
|
|
|
| Alternative slider output widget
|
|
|
| Fractional slider, alternative interface
|
|
|
| Fractional slider
|
|
|
| Fractional slider, alternative interface
|
|
|
| Boolean input widget
|
|
|
| Boolean output widget
|
|
|
| Alternative Boolean output widget
|
|
|
| Simple button with value & label. Use 'button\'' for custom properties.
|
|
|
| Button with value & properties. If you just want a label, use button.
|
|
|
| Minimal size button with value & label
|
|
|
| Input from a "menu" of string choices.
|
|
|
| Input from a timer and a means of polling. Interval is in seconds.
If poll is expensive, then apply cache to the resulting UI.
|
|
| Explicit layout
|
|
|
|
|
|
|
|
|
|
| Produced by Haddock version 2.1.0 |