import Graphics.UI.FLTK main = do w <- newWindow 0 0 640 480 [ label := "myapp" ] t <- newTabs 0 0 640 480 [] rn "buttons" buttons rn "browser" browser rn "inputs" inputs rn "effects" effects run w rn n act = do bw <- newGroup 0 20 640 460 [label := n] act end bw buttons = do newButton 0 40 200 40 [label := "Button"] newCheckButton 200 40 200 40 [label := "CheckButton"] newLightButton 0 80 200 40 [label := "LightButton"] newRepeatButton 200 80 200 40 [label := "RepeatButton"] newReturnButton 0 120 200 40 [label := "ReturnButton"] newRoundButton 200 120 200 40 [label := "RoundButton"] browser = do b <- newMultiBrowser 0 40 600 400 [columnWidths := [100,200,100]] add b `mapM` ["foo\tbar\tbaz","nana\ttutu\thutu","1\t2\t3"] inputs = do newInput 0 40 200 40 [ value := "Input" ] newFileInput 200 40 200 40 [ value := "FileInput"] newFloatInput 0 80 200 40 [ value := "FloatInput"] newIntInput 200 80 200 40 [ value := "IntInput"] newMultiInput 0 120 200 40 [ value := "MultiInput"] newSecretInput 200 120 200 40 [ value := "SecretInput"] newOutput 0 160 200 40 [ value := "Output"] newMultiOutput 200 160 200 40 [ value := "MultiOutput"] effects = do newButton 0 40 200 40 [ label := "Tooltips...", tooltip := "My tooltip" ] newButton 0 80 200 40 [ label := "Big fonts", labelSize := 16 ] newButton 200 80 200 40 [ label := "Small fonts", labelSize := 12 ] newButton 0 120 200 40 [ label := "Colors", color := blue, labelColor := red, selectionColor := green ] newButton 200 120 200 40 [ label := "Even rgb", color := rgb 255 255 0]