]> Git — Sourcephile - tmp/julm/arpeggigon.git/blob - src/RMCA/GUI/MainSettings.hs
Better note selection.
[tmp/julm/arpeggigon.git] / src / RMCA / GUI / MainSettings.hs
1 module RMCA.GUI.MainSettings where
2
3 import Data.ReactiveValue
4 import Graphics.UI.Gtk
5 import Graphics.UI.Gtk.Reactive
6
7 globalSettings :: IO (VBox, ReactiveFieldReadWrite IO Int)
8 globalSettings = do
9 globalSettingsBox <- vBoxNew False 10
10 tempoAdj <- adjustmentNew 120 40 200 1 1 1
11 tempoLabel <- labelNew (Just "Tempo")
12 boxPackStart globalSettingsBox tempoLabel PackNatural 0
13 tempoScale <- hScaleNew tempoAdj
14 boxPackStart globalSettingsBox tempoScale PackNatural 0
15 scaleSetDigits tempoScale 0
16 let tempoRV =
17 bijection (floor, fromIntegral) `liftRW` scaleValueReactive tempoScale
18
19 return (globalSettingsBox, tempoRV)