-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Purely FunctionaL User Interface -- -- This package contains a set of composable purely functional widgets -- and a mainloop adapter to adapt the widgets to run in IO. It is -- HaskGame based. -- -- HaskGame does not yet wrap SDL properly, so it uses SDL directly as -- well. -- -- Project wiki page: http://haskell.org/haskellwiki/LUI -- -- © 2009 by Eyal Lotem; BSD3 license. @package lui @version 0.0.6 module Graphics.UI.LUI.Image data Image text :: Color -> Font -> String -> Image textSize :: Font -> String -> Vector2 Int rect :: Color -> Vector2 Int -> Image move :: Vector2 Int -> Image -> Image crop :: Vector2 Int -> Image -> Image cropRect :: Rect -> Image -> Image render :: Image -> Surface -> Vector2 Int -> IO () instance Monoid Image module Graphics.UI.LUI.Accessor data Accessor whole part accessor :: (whole -> part) -> (part -> whole -> whole) -> Accessor whole part convertor :: (whole -> part) -> (part -> whole) -> Accessor whole part (^.) :: whole -> Accessor whole part -> part (^:) :: Accessor whole part -> (part -> part) -> whole -> whole (<^) :: Accessor b c -> Accessor a b -> Accessor a c (^>) :: Accessor a b -> Accessor b c -> Accessor a c self :: Accessor a a -- | Test whether a list is empty. null :: [a] -> Bool reader :: r -> Accessor a r write :: Accessor whole part -> part -> whole -> whole afirst :: Accessor (a, b) a asecond :: Accessor (a, b) b anth :: Int -> Accessor [a] a aMapValue :: Ord k => k -> Accessor (Map k a) a aMapValueDefault :: Ord k => a -> k -> Accessor (Map k a) a module Graphics.UI.LUI.Widget data DrawInfo DrawInfo :: Bool -> DrawInfo diHasFocus :: DrawInfo -> Bool data WidgetFuncs model WidgetFuncs :: (DrawInfo -> Image) -> (DrawInfo -> Vector2 Int) -> Maybe (ActionHandlers model) -> WidgetFuncs model widgetImage :: WidgetFuncs model -> DrawInfo -> Image widgetSize :: WidgetFuncs model -> DrawInfo -> Vector2 Int widgetGetKeymap :: WidgetFuncs model -> Maybe (ActionHandlers model) data KeyStatus KeyDown :: KeyStatus KeyUp :: KeyStatus type Widget model = model -> WidgetFuncs model type New model mutable = Accessor model mutable -> Widget model type KeyAction = (KeyStatus, KeyGroup) type Handler model = (String, ModKey -> model) type ActionHandlers model = Map KeyAction (Handler model) instance Eq DrawInfo instance Ord DrawInfo instance Show DrawInfo instance Read DrawInfo instance Eq KeyStatus instance Ord KeyStatus instance Show KeyStatus instance Read KeyStatus module Graphics.UI.LUI.Run mainLoop :: Widget model -> model -> IO model module Graphics.UI.LUI.Widgets.TextView new :: Color -> Font -> String -> Widget model module Graphics.UI.LUI.Widgets.Unfocusable new :: Widget model -> Widget model module Graphics.UI.LUI.Widgets.Space new :: Vector2 Int -> Widget model newWH :: Int -> Int -> Widget model newW :: Int -> Widget model newH :: Int -> Widget model module Graphics.UI.LUI.Widgets.Adapter adaptAll :: Endo Image -> Endo (Vector2 Int) -> (Maybe (ActionHandlers part) -> Maybe (ActionHandlers whole)) -> WidgetFuncs part -> WidgetFuncs whole adaptModel :: Accessor whole part -> Widget part -> Widget whole adaptImage :: Endo Image -> Endo (Widget model) adaptSize :: Endo (Vector2 Int) -> Endo (Widget model) module Graphics.UI.LUI.Widgets.FocusDelegator data Mutable Mutable :: Bool -> Mutable mutableDelegateFocus :: Mutable -> Bool type DelegatedMutable mutable = (Mutable, mutable) aDelegatedMutable :: Accessor (DelegatedMutable mutable) mutable aFocusDelegatorMutable :: Accessor (DelegatedMutable mutable) Mutable defaultFocusColor :: Color newWith :: Color -> String -> String -> Widget model -> New model Mutable new :: String -> String -> Widget model -> New model Mutable module Graphics.UI.LUI.Widgets.Grid data Item model Item :: Widget model -> (Double, Double) -> Item model itemWidget :: Item model -> Widget model itemAlignments :: Item model -> (Double, Double) data Mutable Mutable :: Cursor -> Mutable mutableCursor :: Mutable -> Cursor type Items model = Map Cursor (Item model) type Cursor = (Int, Int) noAcc :: Cursor -> Accessor model Mutable new :: Cursor -> Items model -> New model Mutable aMutableCursor :: Accessor Mutable Cursor type DelegatedMutable = DelegatedMutable Mutable delegatedMutable :: Bool -> Cursor -> DelegatedMutable aDelegatedMutableCursor :: Accessor DelegatedMutable Cursor newDelegated :: Cursor -> Items model -> New model DelegatedMutable newDelegatedWith :: Color -> Cursor -> Items model -> New model DelegatedMutable module Graphics.UI.LUI.Widgets.Box data Orientation Horizontal :: Orientation Vertical :: Orientation data Item model Item :: Widget model -> Double -> Item model itemChildWidget :: Item model -> Widget model itemAlignment :: Item model -> Double data Mutable Mutable :: Cursor -> Mutable mutableCursor :: Mutable -> Cursor type Cursor = Int noAcc :: Cursor -> Accessor model Mutable new :: Orientation -> [Item model] -> New model Mutable aMutableCursor :: Accessor Mutable Cursor type DelegatedMutable = DelegatedMutable Mutable delegatedMutable :: Bool -> Cursor -> DelegatedMutable aDelegatedMutableCursor :: Accessor DelegatedMutable Cursor newDelegated :: Orientation -> [Item model] -> New model DelegatedMutable newDelegatedWith :: Color -> Orientation -> [Item model] -> New model DelegatedMutable module Graphics.UI.LUI.Widgets.KeysTable defaultKeysColor :: Color defaultDescColor :: Color defaultSpaceWidth :: Int new :: Color -> Color -> Int -> Font -> Font -> ActionHandlers model -> Widget model newForWidget :: Font -> Font -> Widget model -> Widget model newBoxedWidget :: Orientation -> Int -> Font -> Font -> Widget model -> Widget model module Graphics.UI.LUI.Widgets.TextEdit data Mutable Mutable :: String -> Cursor -> Mutable mutableText :: Mutable -> String mutableCursor :: Mutable -> Cursor aMutableCursor :: Accessor Mutable Cursor aMutableText :: Accessor Mutable String type Cursor = Int defaultCursorWidth :: Int new :: Int -> Color -> Color -> Font -> Color -> New model Mutable type DelegatedMutable = DelegatedMutable Mutable aDelegatedMutableCursor :: Accessor DelegatedMutable Cursor aDelegatedMutableText :: Accessor DelegatedMutable String delegatedMutable :: Bool -> String -> Cursor -> DelegatedMutable newDelegatedWith :: Color -> Int -> Color -> Color -> Font -> Color -> New model DelegatedMutable newDelegated :: Color -> Color -> Font -> Color -> New model DelegatedMutable module Graphics.UI.LUI.Widgets.Scroll new :: Vector2 Int -> Widget model -> New model Mutable data Mutable Mutable :: Vector2 Int -> Mutable mutablePos :: Mutable -> Vector2 Int