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

module HROOT.Class.TPaveStats.Implementation where


import HROOT.TypeCast

import HROOT.Class.TPaveStats.RawType
import HROOT.Class.TPaveStats.FFI
import HROOT.Class.TPaveStats.Interface
import HROOT.Class.TPaveStats.Cast
import HROOT.Class.TClass.RawType
import HROOT.Class.TClass.Cast
import HROOT.Class.TClass.Interface
import HROOT.Class.TPaveText.RawType
import HROOT.Class.TPaveText.Cast
import HROOT.Class.TPaveText.Interface
import HROOT.Class.TPave.RawType
import HROOT.Class.TPave.Cast
import HROOT.Class.TPave.Interface
import HROOT.Class.TAttText.RawType
import HROOT.Class.TAttText.Cast
import HROOT.Class.TAttText.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 ITPaveStats TPaveStats where
instance ITPaveText TPaveStats where
instance ITPave TPaveStats where
instance ITAttText TPaveStats where
  getTextAlign = xform0 c_tpavestats_gettextalign
  getTextAngle = xform0 c_tpavestats_gettextangle
  getTextColor = xform0 c_tpavestats_gettextcolor
  getTextFont = xform0 c_tpavestats_gettextfont
  getTextSize = xform0 c_tpavestats_gettextsize
  resetAttText = xform1 c_tpavestats_resetatttext
  setTextAttributes = xform0 c_tpavestats_settextattributes
  setTextAlign = xform1 c_tpavestats_settextalign
  setTextAngle = xform1 c_tpavestats_settextangle
  setTextColor = xform1 c_tpavestats_settextcolor
  setTextFont = xform1 c_tpavestats_settextfont
  setTextSize = xform1 c_tpavestats_settextsize
  setTextSizePixels = xform1 c_tpavestats_settextsizepixels
instance ITBox TPaveStats where
instance ITObject TPaveStats where
  draw = xform1 c_tpavestats_draw
  findObject = xform1 c_tpavestats_findobject
  getName = xform0 c_tpavestats_getname
  isA = xform0 c_tpavestats_isa
  isFolder = xform0 c_tpavestats_isfolder
  isEqual = xform1 c_tpavestats_isequal
  isSortable = xform0 c_tpavestats_issortable
  paint = xform1 c_tpavestats_paint
  printObj = xform1 c_tpavestats_printobj
  recursiveRemove = xform1 c_tpavestats_recursiveremove
  saveAs = xform2 c_tpavestats_saveas
  useCurrentStyle = xform0 c_tpavestats_usecurrentstyle
  write = xform3 c_tpavestats_write
instance ITAttLine TPaveStats where
  getLineColor = xform0 c_tpavestats_getlinecolor
  getLineStyle = xform0 c_tpavestats_getlinestyle
  getLineWidth = xform0 c_tpavestats_getlinewidth
  resetAttLine = xform1 c_tpavestats_resetattline
  setLineAttributes = xform0 c_tpavestats_setlineattributes
  setLineColor = xform1 c_tpavestats_setlinecolor
  setLineStyle = xform1 c_tpavestats_setlinestyle
  setLineWidth = xform1 c_tpavestats_setlinewidth
instance ITAttFill TPaveStats where
  setFillColor = xform1 c_tpavestats_setfillcolor
  setFillStyle = xform1 c_tpavestats_setfillstyle
instance IDeletable TPaveStats where
  delete = xform0 c_tpavestats_delete

instance ITPaveStats (Exist TPaveStats) where

instance ITPaveText (Exist TPaveStats) where

instance ITPave (Exist TPaveStats) where

instance ITAttText (Exist TPaveStats) where
  getTextAlign (ETPaveStats x) = getTextAlign x
  getTextAngle (ETPaveStats x) = getTextAngle x
  getTextColor (ETPaveStats x) = getTextColor x
  getTextFont (ETPaveStats x) = getTextFont x
  getTextSize (ETPaveStats x) = getTextSize x
  resetAttText (ETPaveStats x) = resetAttText x
  setTextAttributes (ETPaveStats x) = setTextAttributes x
  setTextAlign (ETPaveStats x) = setTextAlign x
  setTextAngle (ETPaveStats x) = setTextAngle x
  setTextColor (ETPaveStats x) = setTextColor x
  setTextFont (ETPaveStats x) = setTextFont x
  setTextSize (ETPaveStats x) = setTextSize x
  setTextSizePixels (ETPaveStats x) = setTextSizePixels x
instance ITBox (Exist TPaveStats) where

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


newTPaveStats :: Double -> Double -> Double -> Double -> String -> IO TPaveStats
newTPaveStats = xform4 c_tpavestats_newtpavestats





instance FPtr (Exist TPaveStats) where
  type Raw (Exist TPaveStats) = RawTPaveStats
  get_fptr (ETPaveStats obj) = castForeignPtr (get_fptr obj)
  cast_fptr_to_obj fptr = ETPaveStats (cast_fptr_to_obj (fptr :: ForeignPtr RawTPaveStats) :: TPaveStats)