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

module HROOT.Class.TPaveText.Implementation where


import HROOT.TypeCast

import HROOT.Class.TPaveText.RawType
import HROOT.Class.TPaveText.FFI
import HROOT.Class.TPaveText.Interface
import HROOT.Class.TPaveText.Cast
import HROOT.Class.TClass.RawType
import HROOT.Class.TClass.Cast
import HROOT.Class.TClass.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 ITPaveText TPaveText where
instance ITPave TPaveText where
instance ITAttText TPaveText where
  getTextAlign = xform0 c_tpavetext_gettextalign
  getTextAngle = xform0 c_tpavetext_gettextangle
  getTextColor = xform0 c_tpavetext_gettextcolor
  getTextFont = xform0 c_tpavetext_gettextfont
  getTextSize = xform0 c_tpavetext_gettextsize
  resetAttText = xform1 c_tpavetext_resetatttext
  setTextAttributes = xform0 c_tpavetext_settextattributes
  setTextAlign = xform1 c_tpavetext_settextalign
  setTextAngle = xform1 c_tpavetext_settextangle
  setTextColor = xform1 c_tpavetext_settextcolor
  setTextFont = xform1 c_tpavetext_settextfont
  setTextSize = xform1 c_tpavetext_settextsize
  setTextSizePixels = xform1 c_tpavetext_settextsizepixels
instance ITBox TPaveText where
instance ITObject TPaveText where
  draw = xform1 c_tpavetext_draw
  findObject = xform1 c_tpavetext_findobject
  getName = xform0 c_tpavetext_getname
  isA = xform0 c_tpavetext_isa
  isFolder = xform0 c_tpavetext_isfolder
  isEqual = xform1 c_tpavetext_isequal
  isSortable = xform0 c_tpavetext_issortable
  paint = xform1 c_tpavetext_paint
  printObj = xform1 c_tpavetext_printobj
  recursiveRemove = xform1 c_tpavetext_recursiveremove
  saveAs = xform2 c_tpavetext_saveas
  useCurrentStyle = xform0 c_tpavetext_usecurrentstyle
  write = xform3 c_tpavetext_write
instance ITAttLine TPaveText where
  getLineColor = xform0 c_tpavetext_getlinecolor
  getLineStyle = xform0 c_tpavetext_getlinestyle
  getLineWidth = xform0 c_tpavetext_getlinewidth
  resetAttLine = xform1 c_tpavetext_resetattline
  setLineAttributes = xform0 c_tpavetext_setlineattributes
  setLineColor = xform1 c_tpavetext_setlinecolor
  setLineStyle = xform1 c_tpavetext_setlinestyle
  setLineWidth = xform1 c_tpavetext_setlinewidth
instance ITAttFill TPaveText where
  setFillColor = xform1 c_tpavetext_setfillcolor
  setFillStyle = xform1 c_tpavetext_setfillstyle
instance IDeletable TPaveText where
  delete = xform0 c_tpavetext_delete

instance ITPaveText (Exist TPaveText) where

instance ITPave (Exist TPaveText) where

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

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


newTPaveText :: Double -> Double -> Double -> Double -> String -> IO TPaveText
newTPaveText = xform4 c_tpavetext_newtpavetext



instance FPtr (Exist TPaveText) where
  type Raw (Exist TPaveText) = RawTPaveText
  get_fptr (ETPaveText obj) = castForeignPtr (get_fptr obj)
  cast_fptr_to_obj fptr = ETPaveText (cast_fptr_to_obj (fptr :: ForeignPtr RawTPaveText) :: TPaveText)