{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Graphics.UI.FLTK.LowLevel.HorSlider ( horSliderNew -- * Hierarchy -- -- $hierarchy ) where #include "Fl_ExportMacros.h" #include "Fl_Types.h" #include "Fl_SliderC.h" import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum) import Graphics.UI.FLTK.LowLevel.Fl_Types import Graphics.UI.FLTK.LowLevel.Utils import Graphics.UI.FLTK.LowLevel.Hierarchy import qualified Data.Text as T {# fun Fl_Hor_Slider_New as horSliderNew' { `Int',`Int',`Int',`Int' } -> `Ptr ()' id #} {# fun Fl_Hor_Slider_New_WithLabel as horSliderNewWithLabel' { `Int',`Int',`Int',`Int', unsafeToCString `T.Text'} -> `Ptr ()' id #} horSliderNew :: Rectangle -> Maybe T.Text -> IO (Ref HorSlider) horSliderNew rectangle l' = let (x_pos, y_pos, width, height) = fromRectangle rectangle in case l' of Nothing -> horSliderNew' x_pos y_pos width height >>= toRef Just l -> horSliderNewWithLabel' x_pos y_pos width height l >>= toRef -- $hierarchy -- @ -- "Graphics.UI.FLTK.LowLevel.Widget" -- | -- v -- "Graphics.UI.FLTK.LowLevel.Valuator" -- | -- v -- "Graphics.UI.FLTK.LowLevel.Slider" -- | -- v -- "Graphics.UI.FLTK.LowLevel.HorSlider" -- @