{-# Language GeneralizedNewtypeDeriving #-}
module Csound.Typed.Gui.Cabbage.Cabbage(
Cab, CabProp, Col(..), runCab,
button, filebutton, infobutton, checkbox, combobox, csoundoutput, encoder, gentable,
hrange, vrange, form, groupbox, image, keyboard, label, hslider, vslider,
rslider, soundfiler, signaldisplay, textbox, texteditor, xypad,
bounds, channel, text1, text2, value, colour, colour0, colour1, backgroundcolour, textcolour, trackercolour, outlinecolour,
fontcolour, fontcolour0, fontcolour1, latched, identchannel, rotate, alpha, visible, caption, widgetarray, popuptext,
active, svgfile, populate, mode, file, shape, corners, channeltype, align, sliderincr, max, min, textbox', trackerthickness,
linethickness, range, range2, size, pluginid, guirefresh, plant, child, show, middlec, keywidth, scrollbars, fontstyle,
scrubberpos, zoom, displaytype, updaterate, wrap
) where
import Prelude hiding (show, min, max)
import Data.Maybe
import Control.Monad.Trans.Writer.Strict
import Csound.Typed.Gui.Cabbage.CabbageLang
type Cab = Cab' ()
type CabProp = CabProp' ()
newtype Cab' a = Cab' { Cab' a -> Writer [Line] a
unCab' :: Writer [Line] a }
deriving (a -> Cab' b -> Cab' a
(a -> b) -> Cab' a -> Cab' b
(forall a b. (a -> b) -> Cab' a -> Cab' b)
-> (forall a b. a -> Cab' b -> Cab' a) -> Functor Cab'
forall a b. a -> Cab' b -> Cab' a
forall a b. (a -> b) -> Cab' a -> Cab' b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Cab' b -> Cab' a
$c<$ :: forall a b. a -> Cab' b -> Cab' a
fmap :: (a -> b) -> Cab' a -> Cab' b
$cfmap :: forall a b. (a -> b) -> Cab' a -> Cab' b
Functor, Functor Cab'
a -> Cab' a
Functor Cab'
-> (forall a. a -> Cab' a)
-> (forall a b. Cab' (a -> b) -> Cab' a -> Cab' b)
-> (forall a b c. (a -> b -> c) -> Cab' a -> Cab' b -> Cab' c)
-> (forall a b. Cab' a -> Cab' b -> Cab' b)
-> (forall a b. Cab' a -> Cab' b -> Cab' a)
-> Applicative Cab'
Cab' a -> Cab' b -> Cab' b
Cab' a -> Cab' b -> Cab' a
Cab' (a -> b) -> Cab' a -> Cab' b
(a -> b -> c) -> Cab' a -> Cab' b -> Cab' c
forall a. a -> Cab' a
forall a b. Cab' a -> Cab' b -> Cab' a
forall a b. Cab' a -> Cab' b -> Cab' b
forall a b. Cab' (a -> b) -> Cab' a -> Cab' b
forall a b c. (a -> b -> c) -> Cab' a -> Cab' b -> Cab' c
forall (f :: * -> *).
Functor f
-> (forall a. a -> f a)
-> (forall a b. f (a -> b) -> f a -> f b)
-> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
-> (forall a b. f a -> f b -> f b)
-> (forall a b. f a -> f b -> f a)
-> Applicative f
<* :: Cab' a -> Cab' b -> Cab' a
$c<* :: forall a b. Cab' a -> Cab' b -> Cab' a
*> :: Cab' a -> Cab' b -> Cab' b
$c*> :: forall a b. Cab' a -> Cab' b -> Cab' b
liftA2 :: (a -> b -> c) -> Cab' a -> Cab' b -> Cab' c
$cliftA2 :: forall a b c. (a -> b -> c) -> Cab' a -> Cab' b -> Cab' c
<*> :: Cab' (a -> b) -> Cab' a -> Cab' b
$c<*> :: forall a b. Cab' (a -> b) -> Cab' a -> Cab' b
pure :: a -> Cab' a
$cpure :: forall a. a -> Cab' a
$cp1Applicative :: Functor Cab'
Applicative, Applicative Cab'
a -> Cab' a
Applicative Cab'
-> (forall a b. Cab' a -> (a -> Cab' b) -> Cab' b)
-> (forall a b. Cab' a -> Cab' b -> Cab' b)
-> (forall a. a -> Cab' a)
-> Monad Cab'
Cab' a -> (a -> Cab' b) -> Cab' b
Cab' a -> Cab' b -> Cab' b
forall a. a -> Cab' a
forall a b. Cab' a -> Cab' b -> Cab' b
forall a b. Cab' a -> (a -> Cab' b) -> Cab' b
forall (m :: * -> *).
Applicative m
-> (forall a b. m a -> (a -> m b) -> m b)
-> (forall a b. m a -> m b -> m b)
-> (forall a. a -> m a)
-> Monad m
return :: a -> Cab' a
$creturn :: forall a. a -> Cab' a
>> :: Cab' a -> Cab' b -> Cab' b
$c>> :: forall a b. Cab' a -> Cab' b -> Cab' b
>>= :: Cab' a -> (a -> Cab' b) -> Cab' b
$c>>= :: forall a b. Cab' a -> (a -> Cab' b) -> Cab' b
$cp1Monad :: Applicative Cab'
Monad)
runCab :: Cab -> [Line]
runCab :: Cab -> [Line]
runCab = ((), [Line]) -> [Line]
forall a b. (a, b) -> b
snd (((), [Line]) -> [Line]) -> (Cab -> ((), [Line])) -> Cab -> [Line]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Writer [Line] () -> ((), [Line])
forall w a. Writer w a -> (a, w)
runWriter (Writer [Line] () -> ((), [Line]))
-> (Cab -> Writer [Line] ()) -> Cab -> ((), [Line])
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Cab -> Writer [Line] ()
forall a. Cab' a -> Writer [Line] a
unCab'
newtype CabProp' a = CabProp' { CabProp' a -> Writer [Property] a
unCabProp' :: Writer [Property] a }
deriving (a -> CabProp' b -> CabProp' a
(a -> b) -> CabProp' a -> CabProp' b
(forall a b. (a -> b) -> CabProp' a -> CabProp' b)
-> (forall a b. a -> CabProp' b -> CabProp' a) -> Functor CabProp'
forall a b. a -> CabProp' b -> CabProp' a
forall a b. (a -> b) -> CabProp' a -> CabProp' b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> CabProp' b -> CabProp' a
$c<$ :: forall a b. a -> CabProp' b -> CabProp' a
fmap :: (a -> b) -> CabProp' a -> CabProp' b
$cfmap :: forall a b. (a -> b) -> CabProp' a -> CabProp' b
Functor, Functor CabProp'
a -> CabProp' a
Functor CabProp'
-> (forall a. a -> CabProp' a)
-> (forall a b. CabProp' (a -> b) -> CabProp' a -> CabProp' b)
-> (forall a b c.
(a -> b -> c) -> CabProp' a -> CabProp' b -> CabProp' c)
-> (forall a b. CabProp' a -> CabProp' b -> CabProp' b)
-> (forall a b. CabProp' a -> CabProp' b -> CabProp' a)
-> Applicative CabProp'
CabProp' a -> CabProp' b -> CabProp' b
CabProp' a -> CabProp' b -> CabProp' a
CabProp' (a -> b) -> CabProp' a -> CabProp' b
(a -> b -> c) -> CabProp' a -> CabProp' b -> CabProp' c
forall a. a -> CabProp' a
forall a b. CabProp' a -> CabProp' b -> CabProp' a
forall a b. CabProp' a -> CabProp' b -> CabProp' b
forall a b. CabProp' (a -> b) -> CabProp' a -> CabProp' b
forall a b c.
(a -> b -> c) -> CabProp' a -> CabProp' b -> CabProp' c
forall (f :: * -> *).
Functor f
-> (forall a. a -> f a)
-> (forall a b. f (a -> b) -> f a -> f b)
-> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
-> (forall a b. f a -> f b -> f b)
-> (forall a b. f a -> f b -> f a)
-> Applicative f
<* :: CabProp' a -> CabProp' b -> CabProp' a
$c<* :: forall a b. CabProp' a -> CabProp' b -> CabProp' a
*> :: CabProp' a -> CabProp' b -> CabProp' b
$c*> :: forall a b. CabProp' a -> CabProp' b -> CabProp' b
liftA2 :: (a -> b -> c) -> CabProp' a -> CabProp' b -> CabProp' c
$cliftA2 :: forall a b c.
(a -> b -> c) -> CabProp' a -> CabProp' b -> CabProp' c
<*> :: CabProp' (a -> b) -> CabProp' a -> CabProp' b
$c<*> :: forall a b. CabProp' (a -> b) -> CabProp' a -> CabProp' b
pure :: a -> CabProp' a
$cpure :: forall a. a -> CabProp' a
$cp1Applicative :: Functor CabProp'
Applicative, Applicative CabProp'
a -> CabProp' a
Applicative CabProp'
-> (forall a b. CabProp' a -> (a -> CabProp' b) -> CabProp' b)
-> (forall a b. CabProp' a -> CabProp' b -> CabProp' b)
-> (forall a. a -> CabProp' a)
-> Monad CabProp'
CabProp' a -> (a -> CabProp' b) -> CabProp' b
CabProp' a -> CabProp' b -> CabProp' b
forall a. a -> CabProp' a
forall a b. CabProp' a -> CabProp' b -> CabProp' b
forall a b. CabProp' a -> (a -> CabProp' b) -> CabProp' b
forall (m :: * -> *).
Applicative m
-> (forall a b. m a -> (a -> m b) -> m b)
-> (forall a b. m a -> m b -> m b)
-> (forall a. a -> m a)
-> Monad m
return :: a -> CabProp' a
$creturn :: forall a. a -> CabProp' a
>> :: CabProp' a -> CabProp' b -> CabProp' b
$c>> :: forall a b. CabProp' a -> CabProp' b -> CabProp' b
>>= :: CabProp' a -> (a -> CabProp' b) -> CabProp' b
$c>>= :: forall a b. CabProp' a -> (a -> CabProp' b) -> CabProp' b
$cp1Monad :: Applicative CabProp'
Monad)
runCabProp :: CabProp -> [Property]
runCabProp :: CabProp -> [Property]
runCabProp = ((), [Property]) -> [Property]
forall a b. (a, b) -> b
snd (((), [Property]) -> [Property])
-> (CabProp -> ((), [Property])) -> CabProp -> [Property]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Writer [Property] () -> ((), [Property])
forall w a. Writer w a -> (a, w)
runWriter (Writer [Property] () -> ((), [Property]))
-> (CabProp -> Writer [Property] ()) -> CabProp -> ((), [Property])
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CabProp -> Writer [Property] ()
forall a. CabProp' a -> Writer [Property] a
unCabProp'
widget :: String -> CabProp -> Cab
widget :: String -> CabProp -> Cab
widget String
name CabProp
props = Writer [Line] () -> Cab
forall a. Writer [Line] a -> Cab' a
Cab' (Writer [Line] () -> Cab) -> Writer [Line] () -> Cab
forall a b. (a -> b) -> a -> b
$ [Line] -> Writer [Line] ()
forall (m :: * -> *) w. Monad m => w -> WriterT w m ()
tell [String -> [Property] -> Line
Line String
name ([Property] -> Line) -> [Property] -> Line
forall a b. (a -> b) -> a -> b
$ CabProp -> [Property]
runCabProp CabProp
props]
button, filebutton, infobutton, checkbox, combobox, csoundoutput, encoder, gentable,
hrange, vrange, form, groupbox, image, keyboard, label, hslider, vslider,
rslider, soundfiler, signaldisplay, textbox, texteditor, xypad :: CabProp -> Cab
button :: CabProp -> Cab
button = String -> CabProp -> Cab
widget String
"button"
filebutton :: CabProp -> Cab
filebutton = String -> CabProp -> Cab
widget String
"filebutton"
infobutton :: CabProp -> Cab
infobutton = String -> CabProp -> Cab
widget String
"infobutton"
checkbox :: CabProp -> Cab
checkbox = String -> CabProp -> Cab
widget String
"checkbox"
combobox :: CabProp -> Cab
combobox = String -> CabProp -> Cab
widget String
"combobox"
csoundoutput :: CabProp -> Cab
csoundoutput = String -> CabProp -> Cab
widget String
"csoundoutput"
encoder :: CabProp -> Cab
encoder = String -> CabProp -> Cab
widget String
"encoder"
gentable :: CabProp -> Cab
gentable = String -> CabProp -> Cab
widget String
"gentable"
hrange :: CabProp -> Cab
hrange = String -> CabProp -> Cab
widget String
"hrange"
vrange :: CabProp -> Cab
vrange = String -> CabProp -> Cab
widget String
"vrange"
form :: CabProp -> Cab
form = String -> CabProp -> Cab
widget String
"form"
groupbox :: CabProp -> Cab
groupbox = String -> CabProp -> Cab
widget String
"groupbox"
image :: CabProp -> Cab
image = String -> CabProp -> Cab
widget String
"image"
keyboard :: CabProp -> Cab
keyboard = String -> CabProp -> Cab
widget String
"keyboard"
label :: CabProp -> Cab
label = String -> CabProp -> Cab
widget String
"label"
hslider :: CabProp -> Cab
hslider = String -> CabProp -> Cab
widget String
"hslider"
vslider :: CabProp -> Cab
vslider = String -> CabProp -> Cab
widget String
"vslider"
rslider :: CabProp -> Cab
rslider = String -> CabProp -> Cab
widget String
"rslider"
soundfiler :: CabProp -> Cab
soundfiler = String -> CabProp -> Cab
widget String
"soundfiler"
signaldisplay :: CabProp -> Cab
signaldisplay = String -> CabProp -> Cab
widget String
"signaldisplay"
textbox :: CabProp -> Cab
textbox = String -> CabProp -> Cab
widget String
"textbox"
texteditor :: CabProp -> Cab
texteditor = String -> CabProp -> Cab
widget String
"texteditor"
xypad :: CabProp -> Cab
xypad = String -> CabProp -> Cab
widget String
"xypad"
mkProperty :: String -> [Arg] -> CabProp
mkProperty :: String -> [Arg] -> CabProp
mkProperty String
name [Arg]
args = Writer [Property] () -> CabProp
forall a. Writer [Property] a -> CabProp' a
CabProp' (Writer [Property] () -> CabProp)
-> Writer [Property] () -> CabProp
forall a b. (a -> b) -> a -> b
$ [Property] -> Writer [Property] ()
forall (m :: * -> *) w. Monad m => w -> WriterT w m ()
tell [String -> [Arg] -> Property
Property String
name [Arg]
args]
data Col = Hash String | Rgb Int Int Int
colProp :: Col -> [Arg]
colProp :: Col -> [Arg]
colProp Col
x = case Col
x of
Hash String
a -> [String -> Arg
StringArg String
a]
Rgb Int
r Int
g Int
b -> (Int -> Arg) -> [Int] -> [Arg]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Int -> Arg
IntArg [Int
r, Int
g, Int
b]
boolProp :: Bool -> Arg
boolProp :: Bool -> Arg
boolProp Bool
x = Int -> Arg
IntArg (Int -> Arg) -> Int -> Arg
forall a b. (a -> b) -> a -> b
$ if Bool
x then Int
1 else Int
0
bounds :: Int -> Int -> Int -> Int -> CabProp
bounds :: Int -> Int -> Int -> Int -> CabProp
bounds Int
x Int
y Int
w Int
h = String -> [Arg] -> CabProp
mkProperty String
"bounds" ((Int -> Arg) -> [Int] -> [Arg]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Int -> Arg
IntArg [Int
x, Int
y, Int
w, Int
h])
channel :: String -> CabProp
channel :: String -> CabProp
channel String
name = String -> [Arg] -> CabProp
mkProperty String
"channel" [String -> Arg
StringArg String
name]
text1 :: String -> CabProp
text1 :: String -> CabProp
text1 String
name = String -> [Arg] -> CabProp
mkProperty String
"text" [String -> Arg
StringArg String
name]
text2 :: String -> String -> CabProp
text2 :: String -> String -> CabProp
text2 String
name1 String
name2 = String -> [Arg] -> CabProp
mkProperty String
"text" [String -> Arg
StringArg String
name1, String -> Arg
StringArg String
name2]
value :: Float -> CabProp
value :: Float -> CabProp
value Float
x = String -> [Arg] -> CabProp
mkProperty String
"value" [Float -> Arg
FloatArg Float
x]
colour :: Col -> CabProp
colour :: Col -> CabProp
colour Col
col = String -> [Arg] -> CabProp
mkProperty String
"colour" (Col -> [Arg]
colProp Col
col)
colour0 :: Col -> CabProp
colour0 :: Col -> CabProp
colour0 Col
col = String -> [Arg] -> CabProp
mkProperty String
"colour:0" (Col -> [Arg]
colProp Col
col)
colour1 :: Col -> CabProp
colour1 :: Col -> CabProp
colour1 Col
col = String -> [Arg] -> CabProp
mkProperty String
"colour:1" (Col -> [Arg]
colProp Col
col)
backgroundcolour :: Col -> CabProp
backgroundcolour :: Col -> CabProp
backgroundcolour Col
col = String -> [Arg] -> CabProp
mkProperty String
"backgroundcolour" (Col -> [Arg]
colProp Col
col)
textcolour :: Col -> CabProp
textcolour :: Col -> CabProp
textcolour Col
col = String -> [Arg] -> CabProp
mkProperty String
"textcolour" (Col -> [Arg]
colProp Col
col)
trackercolour :: Col -> CabProp
trackercolour :: Col -> CabProp
trackercolour Col
col = String -> [Arg] -> CabProp
mkProperty String
"trackercolour" (Col -> [Arg]
colProp Col
col)
outlinecolour :: Col -> CabProp
outlinecolour :: Col -> CabProp
outlinecolour Col
col = String -> [Arg] -> CabProp
mkProperty String
"outlinecolour" (Col -> [Arg]
colProp Col
col)
fontcolour :: Col -> CabProp
fontcolour :: Col -> CabProp
fontcolour Col
col = String -> [Arg] -> CabProp
mkProperty String
"fontcolour" (Col -> [Arg]
colProp Col
col)
fontcolour0 :: Col -> CabProp
fontcolour0 :: Col -> CabProp
fontcolour0 Col
col = String -> [Arg] -> CabProp
mkProperty String
"fontcolour:0" (Col -> [Arg]
colProp Col
col)
fontcolour1 :: Col -> CabProp
fontcolour1 :: Col -> CabProp
fontcolour1 Col
col = String -> [Arg] -> CabProp
mkProperty String
"fontcolour:1" (Col -> [Arg]
colProp Col
col)
latched :: Bool -> CabProp
latched :: Bool -> CabProp
latched Bool
b = String -> [Arg] -> CabProp
mkProperty String
"latched" [Bool -> Arg
boolProp Bool
b]
identchannel :: String -> CabProp
identchannel :: String -> CabProp
identchannel String
s = String -> [Arg] -> CabProp
mkProperty String
"identchannel" [String -> Arg
StringArg String
s]
rotate :: Float -> Float -> Float -> CabProp
rotate :: Float -> Float -> Float -> CabProp
rotate Float
radians Float
pivotx Float
pivoty = String -> [Arg] -> CabProp
mkProperty String
"rotate" ([Arg] -> CabProp) -> [Arg] -> CabProp
forall a b. (a -> b) -> a -> b
$ (Float -> Arg) -> [Float] -> [Arg]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Float -> Arg
FloatArg [Float
radians, Float
pivotx, Float
pivoty]
alpha :: Float -> CabProp
alpha :: Float -> CabProp
alpha Float
a = String -> [Arg] -> CabProp
mkProperty String
"alpha" [Float -> Arg
FloatArg Float
a]
visible :: Bool -> CabProp
visible :: Bool -> CabProp
visible Bool
a = String -> [Arg] -> CabProp
mkProperty String
"visible" [Bool -> Arg
boolProp Bool
a]
caption :: String -> CabProp
caption :: String -> CabProp
caption String
a = String -> [Arg] -> CabProp
mkProperty String
"caption" [String -> Arg
StringArg String
a]
widgetarray :: String -> Int -> CabProp
widgetarray :: String -> Int -> CabProp
widgetarray String
name Int
n = String -> [Arg] -> CabProp
mkProperty String
"widgetarray" [String -> Arg
StringArg String
name, Int -> Arg
IntArg Int
n]
popuptext :: String -> CabProp
String
a = String -> [Arg] -> CabProp
mkProperty String
"popuptext" [String -> Arg
StringArg String
a]
active :: Bool -> CabProp
active :: Bool -> CabProp
active Bool
a = String -> [Arg] -> CabProp
mkProperty String
"active" [Bool -> Arg
boolProp Bool
a]
svgfile :: String -> String -> CabProp
svgfile :: String -> String -> CabProp
svgfile String
ty String
fileName = String -> [Arg] -> CabProp
mkProperty String
"svgfile" ((String -> Arg) -> [String] -> [Arg]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap String -> Arg
StringArg [String
ty, String
fileName])
populate :: String -> String -> CabProp
populate :: String -> String -> CabProp
populate String
filetype String
dir = String -> [Arg] -> CabProp
mkProperty String
"populate" ((String -> Arg) -> [String] -> [Arg]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap String -> Arg
StringArg [String
filetype, String
dir])
mode :: String -> CabProp
mode :: String -> CabProp
mode String
a = String -> [Arg] -> CabProp
mkProperty String
"mode" [String -> Arg
StringArg String
a]
file :: String -> CabProp
file :: String -> CabProp
file String
a = String -> [Arg] -> CabProp
mkProperty String
"file" [String -> Arg
StringArg String
a]
shape :: String -> CabProp
shape :: String -> CabProp
shape String
a = String -> [Arg] -> CabProp
mkProperty String
"shape" [String -> Arg
StringArg String
a]
corners :: Float -> CabProp
corners :: Float -> CabProp
corners Float
a = String -> [Arg] -> CabProp
mkProperty String
"corners" [Float -> Arg
FloatArg Float
a]
channeltype :: String -> CabProp
channeltype :: String -> CabProp
channeltype String
a = String -> [Arg] -> CabProp
mkProperty String
"channeltype" [String -> Arg
StringArg String
a]
align :: String -> CabProp
align :: String -> CabProp
align String
a = String -> [Arg] -> CabProp
mkProperty String
"align" [String -> Arg
StringArg String
a]
sliderincr :: Float -> CabProp
sliderincr :: Float -> CabProp
sliderincr Float
a = String -> [Arg] -> CabProp
mkProperty String
"sliderincr" [Float -> Arg
FloatArg Float
a]
max :: Float -> CabProp
max :: Float -> CabProp
max Float
a = String -> [Arg] -> CabProp
mkProperty String
"max" [Float -> Arg
FloatArg Float
a]
min :: Float -> CabProp
min :: Float -> CabProp
min Float
a = String -> [Arg] -> CabProp
mkProperty String
"min" [Float -> Arg
FloatArg Float
a]
textbox' :: Bool -> CabProp
textbox' :: Bool -> CabProp
textbox' Bool
a = String -> [Arg] -> CabProp
mkProperty String
"textbox" [Bool -> Arg
boolProp Bool
a]
trackerthickness :: Float -> CabProp
trackerthickness :: Float -> CabProp
trackerthickness Float
a = String -> [Arg] -> CabProp
mkProperty String
"trackerthickness" [Float -> Arg
FloatArg Float
a]
linethickness :: Float -> CabProp
linethickness :: Float -> CabProp
linethickness Float
a = String -> [Arg] -> CabProp
mkProperty String
"linethickness" [Float -> Arg
FloatArg Float
a]
range :: Float -> Float -> (Float, Float) -> CabProp
range :: Float -> Float -> (Float, Float) -> CabProp
range Float
minVal Float
maxVal (Float, Float)
val = Float
-> Float -> (Float, Float) -> Maybe Float -> Maybe Float -> CabProp
range2 Float
minVal Float
maxVal (Float, Float)
val Maybe Float
forall a. Maybe a
Nothing Maybe Float
forall a. Maybe a
Nothing
range2 :: Float -> Float -> (Float, Float) -> Maybe Float -> Maybe Float -> CabProp
range2 :: Float
-> Float -> (Float, Float) -> Maybe Float -> Maybe Float -> CabProp
range2 Float
minVal Float
maxVal (Float, Float)
val Maybe Float
mskew Maybe Float
mincr = String -> [Arg] -> CabProp
mkProperty String
"range" ([Arg] -> CabProp) -> [Arg] -> CabProp
forall a b. (a -> b) -> a -> b
$ [Maybe Arg] -> [Arg]
forall a. [Maybe a] -> [a]
catMaybes [Arg -> Maybe Arg
forall a. a -> Maybe a
Just (Arg -> Maybe Arg) -> Arg -> Maybe Arg
forall a b. (a -> b) -> a -> b
$ Float -> Arg
FloatArg Float
minVal, Arg -> Maybe Arg
forall a. a -> Maybe a
Just (Arg -> Maybe Arg) -> Arg -> Maybe Arg
forall a b. (a -> b) -> a -> b
$ Float -> Arg
FloatArg Float
maxVal, Arg -> Maybe Arg
forall a. a -> Maybe a
Just (Arg -> Maybe Arg) -> Arg -> Maybe Arg
forall a b. (a -> b) -> a -> b
$ ((Float -> Float -> Arg) -> (Float, Float) -> Arg
forall a b c. (a -> b -> c) -> (a, b) -> c
uncurry Float -> Float -> Arg
ColonArg) (Float, Float)
val, (Float -> Arg) -> Maybe Float -> Maybe Arg
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Float -> Arg
FloatArg Maybe Float
mskew, (Float -> Arg) -> Maybe Float -> Maybe Arg
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Float -> Arg
FloatArg Maybe Float
mincr]
size :: Int -> Int -> CabProp
size :: Int -> Int -> CabProp
size Int
w Int
h = String -> [Arg] -> CabProp
mkProperty String
"size" ((Int -> Arg) -> [Int] -> [Arg]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Int -> Arg
IntArg [Int
w, Int
h])
pluginid :: String -> CabProp
pluginid :: String -> CabProp
pluginid String
a = String -> [Arg] -> CabProp
mkProperty String
"pluginid" [String -> Arg
StringArg String
a]
guirefresh :: Int -> CabProp
guirefresh :: Int -> CabProp
guirefresh Int
a = String -> [Arg] -> CabProp
mkProperty String
"guirefresh" [Int -> Arg
IntArg Int
a]
plant :: String -> CabProp
plant :: String -> CabProp
plant String
a = String -> [Arg] -> CabProp
mkProperty String
"plant" [String -> Arg
StringArg String
a]
child :: Bool -> CabProp
child :: Bool -> CabProp
child Bool
a = String -> [Arg] -> CabProp
mkProperty String
"child" [Bool -> Arg
boolProp Bool
a]
show :: Bool -> CabProp
show :: Bool -> CabProp
show Bool
a = String -> [Arg] -> CabProp
mkProperty String
"show" [Bool -> Arg
boolProp Bool
a]
middlec :: Int -> CabProp
middlec :: Int -> CabProp
middlec Int
a = String -> [Arg] -> CabProp
mkProperty String
"middlec" [Int -> Arg
IntArg Int
a]
keywidth :: Int -> CabProp
keywidth :: Int -> CabProp
keywidth Int
a = String -> [Arg] -> CabProp
mkProperty String
"keywidth" [Int -> Arg
IntArg Int
a]
scrollbars :: Bool -> CabProp
scrollbars :: Bool -> CabProp
scrollbars Bool
a = String -> [Arg] -> CabProp
mkProperty String
"scrollbars" [Bool -> Arg
boolProp Bool
a]
fontstyle :: String -> CabProp
fontstyle :: String -> CabProp
fontstyle String
a = String -> [Arg] -> CabProp
mkProperty String
"fontstyle" [String -> Arg
StringArg String
a]
scrubberpos :: Int -> CabProp
scrubberpos :: Int -> CabProp
scrubberpos Int
a = String -> [Arg] -> CabProp
mkProperty String
"scrubberpos" [Int -> Arg
IntArg Int
a]
zoom :: Float -> CabProp
zoom :: Float -> CabProp
zoom Float
a = String -> [Arg] -> CabProp
mkProperty String
"zoom" [Float -> Arg
FloatArg Float
a]
displaytype :: String -> CabProp
displaytype :: String -> CabProp
displaytype String
a = String -> [Arg] -> CabProp
mkProperty String
"displaytype" [String -> Arg
StringArg String
a]
updaterate :: Int -> CabProp
updaterate :: Int -> CabProp
updaterate Int
a = String -> [Arg] -> CabProp
mkProperty String
"updaterate" [Int -> Arg
IntArg Int
a]
wrap :: Bool -> CabProp
wrap :: Bool -> CabProp
wrap Bool
a = String -> [Arg] -> CabProp
mkProperty String
"wrap" [Bool -> Arg
boolProp Bool
a]