Module UI2GUI

Library for creating tcl/tk applications from ui descriptions based an the GUI library

Author: Christof Kluss

Version: July 2013

Summary of exported operations:

runUI :: String -> Widget WidgetRef (UIEnv -> IO ()) () -> IO ()   
setValue :: Ref WidgetRef -> String -> UIEnv -> IO ()   
Sets the String value of a variable in an UI.
getValue :: Ref WidgetRef -> UIEnv -> IO String   
Gets the String value of a variable in an UI.
updateValue :: (String -> String) -> Ref WidgetRef -> UIEnv -> IO ()   
Updates the (String) value of a variable w.r.t.
appendValue :: Ref WidgetRef -> String -> UIEnv -> IO ()   
Appends a String value to the contents of a widget.
addCanvas :: Ref WidgetRef -> [CanvasItem] -> UIEnv -> IO ()   
Adds a list of canvas items to a canvas referred by the first argument.
showPopup :: String -> Widget WidgetRef (UIEnv -> IO ()) () -> a -> IO ()   
Runs a Widget in a new window.
showMessage :: String -> UIEnv -> IO ()   
Shows a String Message in a new window.
exitUI :: UIEnv -> IO ()   
An event handler for terminating the GUI.
setHandler :: Ref WidgetRef -> Event -> (UIEnv -> IO a) -> UIEnv -> IO ()   
Sets a new Handler to a Widget referred by the first argument.
setDisabled :: Ref WidgetRef -> Bool -> UIEnv -> IO ()   
Sets the state of a widget to disabled (inactive) or active (inactive widgets do not accept any events)
setVisible :: Ref WidgetRef -> Bool -> UIEnv -> IO ()   
changeStyles :: Ref WidgetRef -> [StyleClass] -> UIEnv -> IO ()   
Changes the style of a widget
setErrorBg :: Ref WidgetRef -> Bool -> UIEnv -> IO ()   

Exported datatypes:


UIEnv

Constructors:


UIRef

Type synonym: UIRef = Ref WidgetRef


UIWidget

Type synonym: UIWidget = Widget WidgetRef (UIEnv -> IO ()) ()


Exported operations:

runUI :: String -> Widget WidgetRef (UIEnv -> IO ()) () -> IO ()   

setValue :: Ref WidgetRef -> String -> UIEnv -> IO ()   

Sets the String value of a variable in an UI.

getValue :: Ref WidgetRef -> UIEnv -> IO String   

Gets the String value of a variable in an UI.

updateValue :: (String -> String) -> Ref WidgetRef -> UIEnv -> IO ()   

Updates the (String) value of a variable w.r.t. to an update function.

appendValue :: Ref WidgetRef -> String -> UIEnv -> IO ()   

Appends a String value to the contents of a widget.

addCanvas :: Ref WidgetRef -> [CanvasItem] -> UIEnv -> IO ()   

Adds a list of canvas items to a canvas referred by the first argument.

showPopup :: String -> Widget WidgetRef (UIEnv -> IO ()) () -> a -> IO ()   

Runs a Widget in a new window.

showMessage :: String -> UIEnv -> IO ()   

Shows a String Message in a new window.

exitUI :: UIEnv -> IO ()   

An event handler for terminating the GUI.

setHandler :: Ref WidgetRef -> Event -> (UIEnv -> IO a) -> UIEnv -> IO ()   

Sets a new Handler to a Widget referred by the first argument. An existing Handler for the same event type is overridden

setDisabled :: Ref WidgetRef -> Bool -> UIEnv -> IO ()   

Sets the state of a widget to disabled (inactive) or active (inactive widgets do not accept any events)

setVisible :: Ref WidgetRef -> Bool -> UIEnv -> IO ()   

changeStyles :: Ref WidgetRef -> [StyleClass] -> UIEnv -> IO ()   

Changes the style of a widget

setErrorBg :: Ref WidgetRef -> Bool -> UIEnv -> IO ()