{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, 
             FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, 
             OverlappingInstances, IncoherentInstances #-}

module HROOT.Class.TSliderBox.Implementation where


import HROOT.TypeCast

import HROOT.Class.TSliderBox.RawType
import HROOT.Class.TSliderBox.FFI
import HROOT.Class.TSliderBox.Interface
import HROOT.Class.TSliderBox.Cast
import HROOT.Class.TClass.RawType
import HROOT.Class.TClass.Cast
import HROOT.Class.TClass.Interface
import HROOT.Class.TWbox.RawType
import HROOT.Class.TWbox.Cast
import HROOT.Class.TWbox.Interface
import HROOT.Class.TBox.RawType
import HROOT.Class.TBox.Cast
import HROOT.Class.TBox.Interface
import HROOT.Class.TObject.RawType
import HROOT.Class.TObject.Cast
import HROOT.Class.TObject.Interface
import HROOT.Class.TAttLine.RawType
import HROOT.Class.TAttLine.Cast
import HROOT.Class.TAttLine.Interface
import HROOT.Class.TAttFill.RawType
import HROOT.Class.TAttFill.Cast
import HROOT.Class.TAttFill.Interface
import HROOT.Class.Deletable.RawType
import HROOT.Class.Deletable.Cast
import HROOT.Class.Deletable.Interface

import Data.Word
-- import Foreign.C            
-- import Foreign.Ptr
import Foreign.ForeignPtr

import System.IO.Unsafe


instance ITSliderBox TSliderBox where
instance ITWbox TSliderBox where
  setBorderMode = xform1 c_tsliderbox_setbordermode
instance ITBox TSliderBox where
instance ITObject TSliderBox where
  draw = xform1 c_tsliderbox_draw
  findObject = xform1 c_tsliderbox_findobject
  getName = xform0 c_tsliderbox_getname
  isA = xform0 c_tsliderbox_isa
  isFolder = xform0 c_tsliderbox_isfolder
  isEqual = xform1 c_tsliderbox_isequal
  isSortable = xform0 c_tsliderbox_issortable
  paint = xform1 c_tsliderbox_paint
  printObj = xform1 c_tsliderbox_printobj
  recursiveRemove = xform1 c_tsliderbox_recursiveremove
  saveAs = xform2 c_tsliderbox_saveas
  useCurrentStyle = xform0 c_tsliderbox_usecurrentstyle
  write = xform3 c_tsliderbox_write
instance ITAttLine TSliderBox where
  getLineColor = xform0 c_tsliderbox_getlinecolor
  getLineStyle = xform0 c_tsliderbox_getlinestyle
  getLineWidth = xform0 c_tsliderbox_getlinewidth
  resetAttLine = xform1 c_tsliderbox_resetattline
  setLineAttributes = xform0 c_tsliderbox_setlineattributes
  setLineColor = xform1 c_tsliderbox_setlinecolor
  setLineStyle = xform1 c_tsliderbox_setlinestyle
  setLineWidth = xform1 c_tsliderbox_setlinewidth
instance ITAttFill TSliderBox where
  setFillColor = xform1 c_tsliderbox_setfillcolor
  setFillStyle = xform1 c_tsliderbox_setfillstyle
instance IDeletable TSliderBox where
  delete = xform0 c_tsliderbox_delete

instance ITSliderBox (Exist TSliderBox) where

instance ITWbox (Exist TSliderBox) where
  setBorderMode (ETSliderBox x) = setBorderMode x
instance ITBox (Exist TSliderBox) where

instance ITObject (Exist TSliderBox) where
  draw (ETSliderBox x) = draw x
  findObject (ETSliderBox x) = findObject x
  getName (ETSliderBox x) = getName x
  isA (ETSliderBox x) = isA x
  isFolder (ETSliderBox x) = isFolder x
  isEqual (ETSliderBox x) = isEqual x
  isSortable (ETSliderBox x) = isSortable x
  paint (ETSliderBox x) = paint x
  printObj (ETSliderBox x) = printObj x
  recursiveRemove (ETSliderBox x) = recursiveRemove x
  saveAs (ETSliderBox x) = saveAs x
  useCurrentStyle (ETSliderBox x) = useCurrentStyle x
  write (ETSliderBox x) = write x
instance ITAttLine (Exist TSliderBox) where
  getLineColor (ETSliderBox x) = getLineColor x
  getLineStyle (ETSliderBox x) = getLineStyle x
  getLineWidth (ETSliderBox x) = getLineWidth x
  resetAttLine (ETSliderBox x) = resetAttLine x
  setLineAttributes (ETSliderBox x) = setLineAttributes x
  setLineColor (ETSliderBox x) = setLineColor x
  setLineStyle (ETSliderBox x) = setLineStyle x
  setLineWidth (ETSliderBox x) = setLineWidth x
instance ITAttFill (Exist TSliderBox) where
  setFillColor (ETSliderBox x) = setFillColor x
  setFillStyle (ETSliderBox x) = setFillStyle x
instance IDeletable (Exist TSliderBox) where
  delete (ETSliderBox x) = delete x


newTSliderBox :: Double -> Double -> Double -> Double -> Int -> Int -> Int -> IO TSliderBox
newTSliderBox = xform6 c_tsliderbox_newtsliderbox



instance FPtr (Exist TSliderBox) where
  type Raw (Exist TSliderBox) = RawTSliderBox
  get_fptr (ETSliderBox obj) = castForeignPtr (get_fptr obj)
  cast_fptr_to_obj fptr = ETSliderBox (cast_fptr_to_obj (fptr :: ForeignPtr RawTSliderBox) :: TSliderBox)