Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- panel :: Gui -> SE ()
- keyPanel :: Gui -> SE ()
- tabs :: [(Text, Gui)] -> SE ()
- keyTabs :: [(Text, Gui)] -> SE ()
- panels :: [Gui] -> SE ()
- keyPanels :: [Gui] -> SE ()
- panelBy :: Text -> Maybe Rect -> Gui -> SE ()
- keyPanelBy :: Text -> Maybe Rect -> Gui -> SE ()
- tabsBy :: Text -> Maybe Rect -> [(Text, Maybe Rect, Gui)] -> SE ()
- keyTabsBy :: Text -> Maybe Rect -> [(Text, Maybe Rect, Gui)] -> SE ()
- type Input a = a
- type Output a = a -> SE ()
- type Inner = SE ()
- noInput :: Input ()
- noOutput :: Output ()
- noInner :: Inner
- type Widget a b = SE (Gui, Output a, Input b, Inner)
- widget :: SE (Gui, Output a, Input b, Inner) -> Widget a b
- type Source a = SE (Gui, Input a)
- source :: SE (Gui, Input a) -> Source a
- type Sink a = SE (Gui, Output a)
- sink :: SE (Gui, Output a) -> Sink a
- type Display = SE Gui
- display :: SE Gui -> Display
- type SinkSource a = SE (Gui, Output a, Input a)
- sinkSource :: SE (Gui, Output a, Input a) -> SinkSource a
- sourceSlice :: SinkSource a -> Source a
- sinkSlice :: SinkSource a -> Sink a
- mapSource :: (a -> b) -> Source a -> Source b
- mapGuiSource :: (Gui -> Gui) -> Source a -> Source a
- mhor :: Monoid a => [Source a] -> Source a
- mver :: Monoid a => [Source a] -> Source a
- msca :: Double -> Source a -> Source a
- count :: ValDiap -> ValStep -> Maybe ValStep -> Double -> Source (Evt D)
- countSig :: ValDiap -> ValStep -> Maybe ValStep -> Double -> Source Sig
- joy :: ValSpan -> ValSpan -> (Double, Double) -> Source (Sig, Sig)
- knob :: Text -> ValSpan -> Double -> Source Sig
- roller :: Text -> ValSpan -> ValStep -> Double -> Source Sig
- slider :: Text -> ValSpan -> Double -> Source Sig
- sliderBank :: Text -> [Double] -> Source [Sig]
- numeric :: Text -> ValDiap -> ValStep -> Double -> Source Sig
- meter :: Text -> ValSpan -> Double -> Sink Sig
- box :: Text -> Display
- button :: Text -> Source (Evt Unit)
- butBank :: Text -> Int -> Int -> (Int, Int) -> Source (Evt (D, D))
- butBankSig :: Text -> Int -> Int -> (Int, Int) -> Source (Sig, Sig)
- butBank1 :: Text -> Int -> Int -> (Int, Int) -> Source (Evt D)
- butBankSig1 :: Text -> Int -> Int -> (Int, Int) -> Source Sig
- toggle :: Text -> Bool -> Source (Evt D)
- toggleSig :: Text -> Bool -> Source Sig
- setNumeric :: Text -> ValDiap -> ValStep -> Double -> Sink Sig
- setToggle :: Text -> Bool -> SinkSource (Evt D)
- setToggleSig :: Text -> Bool -> SinkSource Sig
- setKnob :: Text -> ValSpan -> Double -> SinkSource Sig
- setSlider :: Text -> ValSpan -> Double -> SinkSource Sig
- setTitle :: Text -> Gui -> SE Gui
- data KeyEvt
- data Key
- = CharKey Char
- | F1
- | F2
- | F3
- | F4
- | F5
- | F6
- | F7
- | F8
- | F9
- | F10
- | F11
- | F12
- | Scroll
- | CapsLook
- | LeftShift
- | RightShift
- | LeftCtrl
- | RightCtrl
- | Enter
- | LeftAlt
- | RightAlt
- | LeftWinKey
- | RightWinKey
- | Backspace
- | ArrowUp
- | ArrowLeft
- | ArrowRight
- | ArrowDown
- | Insert
- | Home
- | PgUp
- | Delete
- | End
- | PgDown
- | NumLock
- | NumDiv
- | NumMul
- | NumSub
- | NumHome
- | NumArrowUp
- | NumPgUp
- | NumArrowLeft
- | NumSpace
- | NumArrowRight
- | NumEnd
- | NumArrowDown
- | NumPgDown
- | NumIns
- | NumDel
- | NumEnter
- | NumPlus
- | Num7
- | Num8
- | Num9
- | Num4
- | Num5
- | Num6
- | Num1
- | Num2
- | Num3
- | Num0
- | NumDot
- keyIn :: KeyEvt -> Evt Unit
Panels
panel :: Gui -> SE () Source #
Renders the GUI elements on the window. Rectangle is calculated automatically (window doesn't listens for keyboard events).
keyPanel :: Gui -> SE () Source #
Renders the GUI elements on the window. Rectangle is calculated automatically (window listens for keyboard events).
tabs :: [(Text, Gui)] -> SE () Source #
Renders the GUI elements with tabs. Rectangles are calculated automatically.
keyTabs :: [(Text, Gui)] -> SE () Source #
Renders the GUI elements with tabs. Rectangles are calculated automatically.
keyPanels :: [Gui] -> SE () Source #
Renders a list of panels. Panels are sensitive to keyboard events.
panelBy :: Text -> Maybe Rect -> Gui -> SE () Source #
Renders the GUI elements on the window. We can specify the window title and rectangle of the window.
keyPanelBy :: Text -> Maybe Rect -> Gui -> SE () Source #
Renders the GUI elements on the window. We can specify the window title and rectangle of the window. Panesls are sensitive to keyboard events.
tabsBy :: Text -> Maybe Rect -> [(Text, Maybe Rect, Gui)] -> SE () Source #
Renders the GUI elements with tabs. We can specify the window title and rectangles for all tabs and for the main window.
keyTabsBy :: Text -> Maybe Rect -> [(Text, Maybe Rect, Gui)] -> SE () Source #
Renders the GUI elements with tabs. We can specify the window title and rectangles for all tabs and for the main window. Tabs are sensitive to keyboard events.
Types
type Widget a b = SE (Gui, Output a, Input b, Inner) Source #
A widget consists of visible element (Gui), value consumer (Output) and producer (Input) and an inner state (Inner).
sinkSource :: SE (Gui, Output a, Input a) -> SinkSource a Source #
sourceSlice :: SinkSource a -> Source a Source #
sinkSlice :: SinkSource a -> Sink a Source #
mapSource :: (a -> b) -> Source a -> Source b Source #
A handy function for transforming the value of producers.
mapGuiSource :: (Gui -> Gui) -> Source a -> Source a Source #
A handy function for transforming the GUIs of producers.
mhor :: Monoid a => [Source a] -> Source a Source #
Horizontal grouping of widgets that can produce monoidal values.
mver :: Monoid a => [Source a] -> Source a Source #
Vertical grouping of widgets that can produce monoidal values.
Widgets
count :: ValDiap -> ValStep -> Maybe ValStep -> Double -> Source (Evt D) Source #
Allows the user to increase/decrease a value with mouse clicks on a corresponding arrow button. Output is an event stream that contains values when counter changes.
count diapason fineValStep maybeCoarseValStep initValue
countSig :: ValDiap -> ValStep -> Maybe ValStep -> Double -> Source Sig Source #
A variance on the function count
, but it produces
a signal of piecewise constant function.
joy :: ValSpan -> ValSpan -> (Double, Double) -> Source (Sig, Sig) Source #
It is a squared area that allows the user to modify two output values at the same time. It acts like a joystick.
joy valueSpanX valueSpanY (initX, initY)
knob :: Text -> ValSpan -> Double -> Source Sig Source #
A FLTK widget opcode that creates a knob.
knob valueSpan initValue
roller :: Text -> ValSpan -> ValStep -> Double -> Source Sig Source #
FLroller is a sort of knob, but put transversally.
roller valueSpan step initVal
slider :: Text -> ValSpan -> Double -> Source Sig Source #
FLslider puts a slider into the corresponding container.
slider valueSpan initVal
sliderBank :: Text -> [Double] -> Source [Sig] Source #
Constructs a list of linear unit sliders (ranges in [0, 1]). It takes a list of init values.
numeric :: Text -> ValDiap -> ValStep -> Double -> Source Sig Source #
numeric (originally FLtext in the Csound) allows the user to modify a parameter value by directly typing it into a text field.
numeric diapason step initValue
meter :: Text -> ValSpan -> Double -> Sink Sig Source #
A slider that serves as indicator. It consumes values instead of producing.
meter valueSpan initValue
box :: Text -> Display Source #
A FLTK widget that displays text inside of a box. If the text is longer than 255 characters the text is split on several parts (Csound limitations).
box text
butBank :: Text -> Int -> Int -> (Int, Int) -> Source (Evt (D, D)) Source #
A FLTK widget opcode that creates a bank of buttons. Result is (x, y) coordinate of the triggered button.
butBank xNumOfButtons yNumOfButtons
butBankSig :: Text -> Int -> Int -> (Int, Int) -> Source (Sig, Sig) Source #
A variance on the function butBank
, but it produces
a signal of piecewise constant function.
Result is (x, y) coordinate of the triggered button.
butBank1 :: Text -> Int -> Int -> (Int, Int) -> Source (Evt D) Source #
A FLTK widget opcode that creates a bank of buttons.
butBank xNumOfButtons yNumOfButtons
toggle :: Text -> Bool -> Source (Evt D) Source #
A FLTK widget opcode that creates a toggle button.
button text
toggleSig :: Text -> Bool -> Source Sig Source #
A variance on the function toggle
, but it produces
a signal of piecewise constant function.
setNumeric :: Text -> ValDiap -> ValStep -> Double -> Sink Sig Source #
FLtext that is sink shows current the value of a valuator in a text field.
setToggleSig :: Text -> Bool -> SinkSource Sig Source #
Transformers
Keyboard
Keyboard events.
Keys.