-- GENERATED by C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}
{-# LANGUAGE CPP, ExistentialQuantification, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.Base.Tree
  (
    treeNew,
    treeCustom
  , drawTreeBase
  , handleTreeBase
  , resizeTreeBase
  , hideTreeBase
  , showWidgetTreeBase
    -- * Hierarchy
    --
    -- $hierarchy

    -- * Functions
    --
    -- $functions
  )
where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp





import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
import Graphics.UI.FLTK.LowLevel.TreeItem
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified Data.Text as T
import Graphics.UI.FLTK.LowLevel.Base.Widget

overriddenWidgetNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWidgetNewWithLabel' a1 a2 a3 a4 a5 a6 =
  let {a1' = fromIntegral a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = fromIntegral a4} in 
  (flip ($)) a5 $ \a5' -> 
  let {a6' = id a6} in 
  overriddenWidgetNewWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 34 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

overriddenWidgetNew' :: (Int) -> (Int) -> (Int) -> (Int) -> (Ptr ()) -> IO ((Ptr ()))
overriddenWidgetNew' a1 a2 a3 a4 a5 =
  let {a1' = fromIntegral a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = fromIntegral a4} in 
  let {a5' = id a5} in 
  overriddenWidgetNew''_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 35 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

treeCustom ::
       Rectangle                         -- ^ The bounds of this Tree
    -> Maybe T.Text                      -- ^ The Tree label
    -> Maybe (Ref Tree -> IO ())           -- ^ Optional custom drawing function
    -> Maybe (CustomWidgetFuncs Tree)      -- ^ Optional custom widget functions
    -> IO (Ref Tree)
treeCustom rectangle l' draw' funcs' =
  widgetMaker
    rectangle
    l'
    draw'
    funcs'
    overriddenWidgetNew'
    overriddenWidgetNewWithLabel'


treeNew' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Ptr ()))
treeNew' :: Int -> Int -> Int -> Int -> IO (Ptr ())
treeNew' a1 :: Int
a1 a2 :: Int
a2 a3 :: Int
a3 a4 :: Int
a4 =
  let {a1' :: CInt
a1' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a1} in 
  let {a2' :: CInt
a2' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a2} in 
  let {a3' :: CInt
a3' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a3} in 
  let {a4' :: CInt
a4' = Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
a4} in 
  CInt -> CInt -> CInt -> CInt -> IO (Ptr ())
treeNew''_ CInt
a1' CInt
a2' CInt
a3' CInt
a4' IO (Ptr ()) -> (Ptr () -> IO (Ptr ())) -> IO (Ptr ())
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: Ptr ()
res ->
  let {res' :: Ptr ()
res' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
res} in
  Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr ()
res')

{-# LINE 52 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

treeNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (CString) -> IO ((Ptr ()))
treeNewWithLabel' a1 a2 a3 a4 a5 =
  let {a1' = fromIntegral a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = fromIntegral a4} in 
  (flip ($)) a5 $ \a5' -> 
  treeNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 53 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

treeNew :: Rectangle -> Maybe T.Text -> IO (Ref Tree)
treeNew rectangle l' =
  widgetMaker
    rectangle
    l'
    Nothing
    Nothing
    overriddenWidgetNew'
    overriddenWidgetNewWithLabel'

treeDestroy' :: (Ptr ()) -> IO ((()))
treeDestroy' :: Ptr () -> IO ()
treeDestroy' a1 =
  let {a1' = id a1} in 
  treeDestroy''_ a1' >>= \res ->
  let {res' = () -> ()
forall a. a -> ()
supressWarningAboutRes ()
res} in
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return (()
res')

{-# LINE 64 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (IO ())) => Op (Destroy ()) TreeBase orig impl where
  runOp _ _ tree = swapRef tree $ \treePtr -> do
    treeDestroy' treePtr
    return nullPtr

showSelf' :: (Ptr ()) -> IO ()
showSelf' :: Ptr () -> IO ()
showSelf' a1 :: Ptr ()
a1 =
  let {a1' = id a1} in 
  Ptr () -> IO ()
showSelf''_ Ptr ()
a1' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 70 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO ()) ) => Op (ShowSelf ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> showSelf' treePtr
rootLabel' :: (Ptr ()) -> (Ptr CChar) -> IO ()
rootLabel' :: Ptr () -> CString -> IO ()
rootLabel' a1 :: Ptr ()
a1 a2 :: CString
a2 =
  let {a1' = id a1} in 
  let {a2' :: CString
a2' = CString -> CString
forall a. a -> a
id CString
a2} in 
  Ptr () -> CString -> IO ()
rootLabel''_ Ptr ()
a1' CString
a2' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 73 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (T.Text ->  IO ()) ) => Op (RootLabel ()) TreeBase orig impl where
  runOp _ _ tree new_label = withRef tree $ \treePtr -> withText new_label (\new_labelPtr -> rootLabel' treePtr new_labelPtr)
root' :: (Ptr ()) -> IO ((Ptr ()))
root' :: Ptr () -> IO (Ptr ())
root' a1 :: Ptr ()
a1 =
  let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  Ptr () -> IO (Ptr ())
root''_ Ptr ()
a1' IO (Ptr ()) -> (Ptr () -> IO (Ptr ())) -> IO (Ptr ())
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: Ptr ()
res ->
  let {res' :: Ptr ()
res' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
res} in
  Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr ()
res')

{-# LINE 76 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (Root ()) TreeBase orig impl where
  runOp _ _  tree = withRef tree $ \treePtr -> root' treePtr >>= toMaybeRef
add' :: (Ptr ()) -> (Ptr CChar) -> IO ((Ptr ()))
add' :: Ptr () -> CString -> IO (Ptr ())
add' a1 :: Ptr ()
a1 a2 :: CString
a2 =
  let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  let {a2' = id a2} in 
  Ptr () -> CString -> IO (Ptr ())
add''_ Ptr ()
a1' CString
a2' IO (Ptr ()) -> (Ptr () -> IO (Ptr ())) -> IO (Ptr ())
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: Ptr ()
res ->
  let {res' :: Ptr ()
res' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
res} in
  Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr ()
res')

{-# LINE 79 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

addWithItemName' :: (Ptr ()) -> (Ptr ()) -> (Ptr CChar) -> IO ((Ptr ()))
addWithItemName' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  addWithItemName''_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 80 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (T.Text ->  IO (Maybe (Ref TreeItem)))) => Op (Add ()) TreeBase orig impl where
  runOp _ _  tree path' = withRef tree $ \treePtr -> withText path' (\pathPtr' -> add' treePtr pathPtr' >>= toMaybeRef )
instance (Parent a TreeItem, impl ~ (T.Text -> Ref a -> IO (Maybe (Ref TreeItem)))) => Op (AddAt ()) TreeBase orig impl where
  runOp _ _ tree path' item' =
    withRef tree  $ \treePtr ->
    withRef item' $ \itemPtr ->
    withText path' $ \pathPtr ->
    addWithItemName' treePtr itemPtr pathPtr >>= toMaybeRef
insertAbove' :: (Ptr ()) -> (Ptr ()) -> (CString) -> IO ((Ptr ()))
insertAbove' :: Ptr () -> Ptr () -> CString -> IO (Ptr ())
insertAbove' a1 :: Ptr ()
a1 a2 :: Ptr ()
a2 a3 :: CString
a3 =
  let {a1' = id a1} in 
  let {a2' :: Ptr ()
a2' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a2} in 
  (((CString -> IO (Ptr ())) -> CString -> IO (Ptr ()))
-> CString -> (CString -> IO (Ptr ())) -> IO (Ptr ())
forall a b c. (a -> b -> c) -> b -> a -> c
flip (CString -> IO (Ptr ())) -> CString -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
($)) CString
a3 ((CString -> IO (Ptr ())) -> IO (Ptr ()))
-> (CString -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \a3' :: CString
a3' -> 
  Ptr () -> Ptr () -> CString -> IO (Ptr ())
insertAbove''_ Ptr ()
a1' Ptr ()
a2' CString
a3' IO (Ptr ()) -> (Ptr () -> IO (Ptr ())) -> IO (Ptr ())
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res ->
  let {res' :: Ptr ()
res' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
res} in
  Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr ()
res')

{-# LINE 89 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a TreeItem, impl ~ (Ref a -> T.Text ->  IO (Maybe (Ref a)))) => Op (InsertAbove ()) TreeBase orig impl where
  runOp _ _  tree above name = withRef tree $ \treePtr -> withRef above $ \abovePtr -> copyTextToCString name >>= \n -> insertAbove' treePtr abovePtr n >>= toMaybeRef
insert' :: (Ptr ()) -> (Ptr ()) -> (CString) -> (Int) -> IO ((Ptr ()))
insert' a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' :: Ptr ()
a2' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a2} in 
  (((CString -> IO (Ptr ())) -> CString -> IO (Ptr ()))
-> CString -> (CString -> IO (Ptr ())) -> IO (Ptr ())
forall a b c. (a -> b -> c) -> b -> a -> c
flip (CString -> IO (Ptr ())) -> CString -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
($)) CString
a3 ((CString -> IO (Ptr ())) -> IO (Ptr ()))
-> (CString -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \a3' :: CString
a3' -> 
  let {a4' = fromIntegral a4} in 
  insert''_ a1' a2' a3' a4' >>= \res ->
  let {res' = id res} in
  Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr ()
res')

{-# LINE 92 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a TreeItem, impl ~ (Ref a -> T.Text -> AtIndex ->  IO (Maybe (Ref a)))) => Op (Insert ()) TreeBase orig impl where
  runOp _ _ tree item name (AtIndex pos) = withRef tree $ \treePtr -> withRef item $ \itemPtr -> copyTextToCString name >>= \n -> insert' treePtr itemPtr n pos >>= toMaybeRef
remove' :: (Ptr ()) -> (Ptr ()) -> IO ((Int))
remove' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  remove''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 95 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO (Either TreeItemNotFound ())) ) => Op (Remove ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> do
    status' <- remove' treePtr itemPtr
    if (status' == (-1)) then (return $ Left TreeItemNotFound) else (return $ Right ())
clear' :: (Ptr ()) -> IO ()
clear' a1 =
  let {a1' = id a1} in 
  clear''_ a1' >>
  return ()

{-# LINE 100 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO ()) ) => Op (Clear ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> clear' treePtr
clearChildren' :: (Ptr ()) -> (Ptr ()) -> IO ()
clearChildren' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  clearChildren''_ a1' a2' >>
  return ()

{-# LINE 103 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a TreeItem, impl ~ (Ref a ->  IO ()) ) => Op (ClearChildren ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> clearChildren' treePtr itemPtr
findItem' :: (Ptr ()) -> (CString) -> IO ((Ptr ()))
findItem' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  findItem''_ a1' a2' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 106 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (T.Text ->  IO (Maybe (Ref TreeItem))) ) => Op (FindItem ()) TreeBase orig impl where
  runOp _ _ tree path = withRef tree $ \treePtr -> withText path (\p -> findItem' treePtr p >>= toMaybeRef)
itemPathname' :: (Ptr ()) -> (Ptr CChar) -> (Int) -> (Ptr ()) -> IO ((Int))
itemPathname' a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = id a4} in 
  itemPathname''_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 109 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a TreeItem, impl ~ (Ref a ->  IO (Maybe T.Text)) ) => Op (ItemPathname ()) TreeBase orig impl where
  runOp _ _ tree item =
    withRef tree $ \treePtr ->
    withRef item $ \itemPtr ->
    allocaBytes oneKb $ \pathPtr -> do
    retVal' <- itemPathname' treePtr pathPtr oneKb itemPtr
    if retVal' < 0
      then return Nothing
      else do
       b' <- cStringToText (castPtr pathPtr)
       return (Just b')
itemClicked' :: (Ptr ()) -> IO ((Ptr ()))
itemClicked' :: Ptr () -> IO (Ptr ())
itemClicked' a1 =
  let {a1' = id a1} in 
  Ptr () -> IO (Ptr ())
itemClicked''_ Ptr ()
a1' IO (Ptr ()) -> (Ptr () -> IO (Ptr ())) -> IO (Ptr ())
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: Ptr ()
res ->
  let {res' :: Ptr ()
res' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
res} in
  Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr ()
res')

{-# LINE 121 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (ItemClicked ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> itemClicked' treePtr >>= toMaybeRef
first' :: (Ptr ()) -> IO ((Ptr ()))
first' a1 =
  let {a1' = id a1} in 
  first''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 124 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (GetFirst ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> first' treePtr >>= toMaybeRef
firstVisible' :: (Ptr ()) -> IO ((Ptr ()))
firstVisible' a1 =
  let {a1' = id a1} in 
  firstVisible''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 127 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (FirstVisible ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> firstVisible' treePtr >>= toMaybeRef
next' :: (Ptr ()) -> IO ((Ptr ()))
next' a1 =
  let {a1' = id a1} in 
  next''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 130 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (Next ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> next' treePtr >>= toMaybeRef
nextWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Ptr ()))
nextWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  nextWithItem''_ a1' a2' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 133 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO (Maybe (Ref TreeItem))) ) => Op (NextAfterItem ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> nextWithItem' treePtr itemPtr >>= toMaybeRef
nextItem' :: (Ptr ()) -> (Ptr ()) -> (CInt) -> (Bool) -> IO ((Ptr ()))
nextItem' a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = cFromBool a4} in 
  nextItem''_ a1' a2' a3' a4' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 136 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  Maybe SearchDirection -> Bool -> IO (Maybe (Ref TreeItem))) ) => Op (NextItem ()) TreeBase orig impl where
  runOp _ _ tree item dir visible' =
    withRef tree $ \treePtr -> withRef item $ \itemPtr -> nextItem' treePtr itemPtr (maybe 0 (fromIntegral . fromEnum) dir) visible'
       >>= toMaybeRef
prev' :: (Ptr ()) -> IO ((Ptr ()))
prev' a1 =
  let {a1' = id a1} in 
  prev''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 141 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (Prev ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> prev' treePtr >>= toMaybeRef
prevWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Ptr ()))
prevWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  prevWithItem''_ a1' a2' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 144 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO (Maybe (Ref TreeItem))) ) => Op (PrevBeforeItem ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> prevWithItem' treePtr itemPtr >>= toMaybeRef
last' :: (Ptr ()) -> IO ((Ptr ()))
last' a1 =
  let {a1' = id a1} in 
  last''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 147 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (GetLast ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> last' treePtr >>= toMaybeRef
lastVisible' :: (Ptr ()) -> IO ((Ptr ()))
lastVisible' a1 =
  let {a1' = id a1} in 
  lastVisible''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 150 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (LastVisible ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> lastVisible' treePtr >>= toMaybeRef
firstSelectedItem' :: (Ptr ()) -> IO ((Ptr ()))
firstSelectedItem' a1 =
  let {a1' = id a1} in 
  firstSelectedItem''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 153 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (FirstSelectedItem ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> firstSelectedItem' treePtr >>= toMaybeRef
lastSelectedItem' :: (Ptr ()) -> IO ((Ptr ()))
lastSelectedItem' a1 =
  let {a1' = id a1} in 
  lastSelectedItem''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 156 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (LastSelectedItem ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> lastSelectedItem' treePtr >>= toMaybeRef
nextSelectedItem' :: (Ptr ()) -> IO ((Ptr ()))
nextSelectedItem' a1 =
  let {a1' = id a1} in 
  nextSelectedItem''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 159 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (NextSelectedItem ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> nextSelectedItem' treePtr >>= toMaybeRef
nextSelectedItemWithItemDirection' :: (Ptr ()) -> (Ptr ()) -> (CInt) -> IO ((Ptr ()))
nextSelectedItemWithItemDirection' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  nextSelectedItemWithItemDirection''_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 162 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  Maybe SearchDirection -> IO (Maybe (Ref TreeItem))) ) => Op (NextSelectedItemAfterItem ()) TreeBase orig impl where
  runOp _ _ tree item dir = withRef tree $ \treePtr -> withRef item $ \itemPtr -> nextSelectedItemWithItemDirection' treePtr itemPtr (maybe 0 (fromIntegral . fromEnum) dir) >>= toMaybeRef
openWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Int))
openWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  openWithItem''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 165 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

openWithItemDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ((Int))
openWithItemDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  openWithItemDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 166 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

openWithPath' :: (Ptr ()) -> (CString) -> IO ((Int))
openWithPath' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  openWithPath''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 167 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

openWithPathDocallback' :: (Ptr ()) -> (CString) -> (Bool) -> IO ((Int))
openWithPathDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = cFromBool a3} in 
  openWithPathDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 168 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemLocator -> IO ()) ) => Op (Open ()) TreeBase orig impl where
  runOp _ _ tree_item locator' =
    withRef tree_item $ \tree_itemPtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer itemRef) -> withRef itemRef $ \itemRefPtr -> openWithItem' tree_itemPtr itemRefPtr >> return ()
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> openWithPath' tree_itemPtr n'' >> return ())
instance  (impl ~ (TreeItemLocator -> Bool -> IO ())) => Op (OpenAndCallback ()) TreeBase orig impl where
  runOp _ _ tree_item locator' docallback' =
    withRef tree_item $ \tree_itemPtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer itemRef) -> withRef itemRef $ \itemRefPtr -> openWithItemDocallback' tree_itemPtr itemRefPtr docallback' >> return ()
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> openWithPathDocallback' tree_itemPtr n'' docallback' >> return ())
openToggle' :: (Ptr ()) -> (Ptr ()) -> IO ()
openToggle' :: Ptr () -> Ptr () -> IO ()
openToggle' a1 :: Ptr ()
a1 a2 :: Ptr ()
a2 =
  let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  let {a2' = id a2} in 
  Ptr () -> Ptr () -> IO ()
openToggle''_ Ptr ()
a1' Ptr ()
a2' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 181 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

openToggleWithDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ()
openToggleWithDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  openToggleWithDocallback''_ a1' a2' a3' >>
  return ()

{-# LINE 182 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (OpenToggle ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> openToggle' treePtr itemPtr
instance (impl ~ (Ref TreeItem  -> Bool ->  IO ()) ) => Op (OpenToggleAndCallback ()) TreeBase orig impl where
  runOp _ _ tree item docallback = withRef tree $ \treePtr -> withRef item $ \itemPtr -> openToggleWithDocallback' treePtr itemPtr docallback
closeWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Int))
closeWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  closeWithItem''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 187 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

closeWithItemDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ((Int))
closeWithItemDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  closeWithItemDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 188 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

closeWithPath' :: (Ptr ()) -> (CString) -> IO ((Int))
closeWithPath' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  closeWithPath''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 189 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

closeWithPathDocallback' :: (Ptr ()) -> (CString) -> (Bool) -> IO ((Int))
closeWithPathDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = cFromBool a3} in 
  closeWithPathDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 190 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemLocator -> IO ()) ) => Op (Close ()) TreeBase orig impl where
  runOp _ _ tree_item locator' =
    withRef tree_item $ \tree_itemPtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer itemRef) -> withRef itemRef $ \itemRefPtr -> closeWithItem' tree_itemPtr itemRefPtr >> return ()
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> closeWithPath' tree_itemPtr n'' >> return ())
instance  (impl ~ (TreeItemLocator -> Bool -> IO ())) => Op (CloseAndCallback ()) TreeBase orig impl where
  runOp _ _ tree_item locator' docallback' =
    withRef tree_item $ \tree_itemPtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer itemRef) -> withRef itemRef $ \itemRefPtr -> closeWithItemDocallback' tree_itemPtr itemRefPtr docallback' >> return ()
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> closeWithPathDocallback' tree_itemPtr n'' docallback' >> return ())
isOpenWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Bool))
isOpenWithItem' :: Ptr () -> Ptr () -> IO Bool
isOpenWithItem' a1 :: Ptr ()
a1 a2 :: Ptr ()
a2 =
  let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  let {a2' :: Ptr ()
a2' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a2} in 
  Ptr () -> Ptr () -> IO CInt
isOpenWithItem''_ Ptr ()
a1' Ptr ()
a2' IO CInt -> (CInt -> IO Bool) -> IO Bool
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \res :: CInt
res ->
  let {res' :: Bool
res' = CInt -> Bool
forall a. (Eq a, Num a, Ord a) => a -> Bool
cToBool CInt
res} in
  Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
res')

{-# LINE 203 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

isOpenWithPath' :: (Ptr ()) -> (CString) -> IO ((Bool))
isOpenWithPath' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  isOpenWithPath''_ a1' a2' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 204 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemLocator ->  IO (Bool)) ) => Op (IsOpen ()) TreeBase orig impl where
  runOp _ _ tree locator' = withRef tree $ \treePtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer r') -> withRef r' $ \r'Ptr -> isOpenWithItem' treePtr r'Ptr
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> isOpenWithPath' treePtr n'')
isCloseWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Bool))
isCloseWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  isCloseWithItem''_ a1' a2' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 210 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

isCloseWithPath' :: (Ptr ()) -> (CString) -> IO ((Bool))
isCloseWithPath' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  isCloseWithPath''_ a1' a2' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 211 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemLocator ->  IO (Bool)) ) => Op (IsClose ()) TreeBase orig impl where
  runOp _ _ tree locator' = withRef tree $ \treePtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer r') -> withRef r' $ \r'Ptr -> isCloseWithItem' treePtr r'Ptr
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> isCloseWithPath' treePtr n'')
selectWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Int))
selectWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  selectWithItem''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 217 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

selectWithItemDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ((Int))
selectWithItemDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  selectWithItemDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 218 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

selectWithPath' :: (Ptr ()) -> (CString) -> IO ((Int))
selectWithPath' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  selectWithPath''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 219 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

selectWithPathDocallback' :: (Ptr ()) -> (CString) -> (Bool) -> IO ((Int))
selectWithPathDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = cFromBool a3} in 
  selectWithPathDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 220 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemLocator  ->  IO (Either NoChange ())) ) => Op (Select ()) TreeBase orig impl where
  runOp _ _ tree locator' =
    withRef tree $ \treePtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer r') -> withRef r' $ \r'Ptr -> selectWithItem' treePtr r'Ptr >>= return . successOrNoChange
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> selectWithPath' treePtr n'' >>= return . successOrNoChange)
instance  (impl ~ (TreeItemLocator -> Bool -> IO ())) => Op (SelectAndCallback ()) TreeBase orig impl where
  runOp _ _ tree_item locator' docallback' =
    withRef tree_item $ \tree_itemPtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer itemRef) -> withRef itemRef $ \itemRefPtr -> selectWithItemDocallback' tree_itemPtr itemRefPtr docallback' >> return ()
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> selectWithPathDocallback' tree_itemPtr n'' docallback' >> return ())
selectToggle' :: (Ptr ()) -> (Ptr ()) -> IO ()
selectToggle' :: Ptr () -> Ptr () -> IO ()
selectToggle' a1 :: Ptr ()
a1 a2 :: Ptr ()
a2 =
  let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  let {a2' = id a2} in 
  Ptr () -> Ptr () -> IO ()
selectToggle''_ Ptr ()
a1' Ptr ()
a2' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 233 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

selectToggleWithDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ()
selectToggleWithDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  selectToggleWithDocallback''_ a1' a2' a3' >>
  return ()

{-# LINE 234 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (SelectToggle ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> selectToggle' treePtr itemPtr
instance (impl ~ (Ref TreeItem  -> Bool ->  IO ()) ) => Op (SelectToggleAndCallback ()) TreeBase orig impl where
  runOp _ _ tree item docallback = withRef tree $ \treePtr -> withRef item $ \itemPtr -> selectToggleWithDocallback' treePtr itemPtr docallback
deselectWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Int))
deselectWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  deselectWithItem''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 239 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

deselectWithItemDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ((Int))
deselectWithItemDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  deselectWithItemDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 240 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

deselectWithPath' :: (Ptr ()) -> (CString) -> IO ((Int))
deselectWithPath' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  deselectWithPath''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 241 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

deselectWithPathDocallback' :: (Ptr ()) -> (CString) -> (Bool) -> IO ((Int))
deselectWithPathDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = cFromBool a3} in 
  deselectWithPathDocallback''_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 242 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemLocator  ->  IO (Either NoChange ())) ) => Op (Deselect ()) TreeBase orig impl where
  runOp _ _ tree locator' =
    withRef tree $ \treePtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer r') -> withRef r' $ \r'Ptr -> deselectWithItem' treePtr r'Ptr >>= return . successOrNoChange
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> deselectWithPath' treePtr n'' >>= return . successOrNoChange)
instance  (impl ~ (TreeItemLocator -> Bool -> IO ())) => Op (DeselectAndCallback ()) TreeBase orig impl where
  runOp _ _ tree_item locator' docallback' =
    withRef tree_item $ \tree_itemPtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer itemRef) -> withRef itemRef $ \itemRefPtr -> deselectWithItemDocallback' tree_itemPtr itemRefPtr docallback' >> return ()
      TreeItemNameLocator (TreeItemName n') -> withText n' (\n'' -> deselectWithPathDocallback' tree_itemPtr n'' docallback' >> return ())
selectOnly' :: (Ptr ()) -> (Ptr ()) -> IO ()
selectOnly' :: Ptr () -> Ptr () -> IO ()
selectOnly' a1 :: Ptr ()
a1 a2 :: Ptr ()
a2 =
  let {a1' :: Ptr ()
a1' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a1} in 
  let {a2' = id a2} in 
  Ptr () -> Ptr () -> IO ()
selectOnly''_ Ptr ()
a1' Ptr ()
a2' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 255 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

selectOnlyWithDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ()
selectOnlyWithDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  selectOnlyWithDocallback''_ a1' a2' a3' >>
  return ()

{-# LINE 256 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (SelectOnly ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> selectOnly' treePtr itemPtr
instance (impl ~ (Ref TreeItem  -> Bool ->  IO ()) ) => Op (SelectOnlyAndCallback ()) TreeBase orig impl where
  runOp _ _ tree item docallback = withRef tree $ \treePtr -> withRef item $ \itemPtr -> selectOnlyWithDocallback' treePtr itemPtr docallback
selectAll' :: (Ptr ()) -> (Ptr ()) -> IO ()
selectAll' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  selectAll''_ a1' a2' >>
  return ()

{-# LINE 261 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

selectAllWithDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ()
selectAllWithDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  selectAllWithDocallback''_ a1' a2' a3' >>
  return ()

{-# LINE 262 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (IO ()) ) => Op (SelectAll ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr ->  selectAll' treePtr nullPtr
instance (impl ~ (Maybe (Ref TreeItem)  -> Bool ->  IO ()) ) => Op (SelectAllAndCallback ()) TreeBase orig impl where
  runOp _ _ tree item docallback = withRef tree $ \treePtr -> withMaybeRef item $ \itemPtr -> selectAllWithDocallback' treePtr itemPtr docallback
deselectAll' :: (Ptr ()) -> (Ptr ()) -> IO ()
deselectAll' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  deselectAll''_ a1' a2' >>
  return ()

{-# LINE 267 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

deselectAllWithDocallback' :: (Ptr ()) -> (Ptr ()) -> (Bool) -> IO ()
deselectAllWithDocallback' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = cFromBool a3} in 
  deselectAllWithDocallback''_ a1' a2' a3' >>
  return ()

{-# LINE 268 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (IO ()) ) => Op (DeselectAll ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr ->  deselectAll' treePtr nullPtr
instance (impl ~ (Maybe (Ref TreeItem)  -> Bool ->  IO ()) ) => Op (DeselectAllAndCallback ()) TreeBase orig impl where
  runOp _ _ tree item docallback = withRef tree $ \treePtr -> withMaybeRef item $ \itemPtr -> deselectAllWithDocallback' treePtr itemPtr docallback
setItemFocus' :: (Ptr ()) -> (Ptr ()) -> IO ()
setItemFocus' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  setItemFocus''_ a1' a2' >>
  return ()

{-# LINE 273 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (SetItemFocus ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> setItemFocus' treePtr itemPtr
getItemFocus' :: (Ptr ()) -> IO ((Ptr ()))
getItemFocus' a1 =
  let {a1' = id a1} in 
  getItemFocus''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 276 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (GetItemFocus ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> getItemFocus' treePtr >>= toMaybeRef
isSelectedWithItem' :: (Ptr ()) -> (Ptr ()) -> IO ((Bool))
isSelectedWithItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  isSelectedWithItem''_ a1' a2' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 279 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

isSelectedWithPath' :: (Ptr ()) -> (CString) -> IO ((Bool))
isSelectedWithPath' a1 a2 =
  let {a1' = id a1} in 
  (flip ($)) a2 $ \a2' -> 
  isSelectedWithPath''_ a1' a2' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 280 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemLocator ->  IO (Bool)) ) => Op (IsSelected ()) TreeBase orig impl where
  runOp _ _ tree locator' = withRef tree $ \treePtr ->
    case locator' of
      TreeItemPointerLocator (TreeItemPointer item) -> withRef item $ \itemPtr -> isSelectedWithItem' treePtr itemPtr
      TreeItemNameLocator (TreeItemName path) -> withText path (\p -> isSelectedWithPath' treePtr p)
itemLabelfont' :: (Ptr ()) -> IO ((Font))
itemLabelfont' a1 =
  let {a1' = id a1} in 
  itemLabelfont''_ a1' >>= \res ->
  let {res' = cToFont res} in
  return (res')

{-# LINE 286 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Font)) ) => Op (GetItemLabelfont ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> itemLabelfont' treePtr
itemSetLabelfont' :: (Ptr ()) -> (Font) -> IO ()
itemSetLabelfont' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromFont a2} in 
  itemSetLabelfont''_ a1' a2' >>
  return ()

{-# LINE 289 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Font ->  IO ()) ) => Op (SetItemLabelfont ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> itemSetLabelfont' treePtr val
itemLabelsize' :: (Ptr ()) -> IO ((CInt))
itemLabelsize' a1 =
  let {a1' = id a1} in 
  itemLabelsize''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 292 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (FontSize)) ) => Op (GetItemLabelsize ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> itemLabelsize' treePtr >>= return . FontSize
itemSetLabelsize' :: (Ptr ()) -> (CInt) -> IO ()
itemSetLabelsize' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  itemSetLabelsize''_ a1' a2' >>
  return ()

{-# LINE 295 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (FontSize ->  IO ()) ) => Op (SetItemLabelsize ()) TreeBase orig impl where
  runOp _ _ tree (FontSize val) = withRef tree $ \treePtr -> itemSetLabelsize' treePtr val
itemLabelfgcolor' :: (Ptr ()) -> IO ((Color))
itemLabelfgcolor' a1 =
  let {a1' = id a1} in 
  itemLabelfgcolor''_ a1' >>= \res ->
  let {res' = cToColor res} in
  return (res')

{-# LINE 298 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Color)) ) => Op (GetItemLabelfgcolor ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> itemLabelfgcolor' treePtr
setItemLabelfgcolor' :: (Ptr ()) -> (Color) -> IO ()
setItemLabelfgcolor' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromColor a2} in 
  setItemLabelfgcolor''_ a1' a2' >>
  return ()

{-# LINE 301 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Color ->  IO ()) ) => Op (SetItemLabelfgcolor ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setItemLabelfgcolor' treePtr val
itemLabelbgcolor' :: (Ptr ()) -> IO ((Color))
itemLabelbgcolor' a1 =
  let {a1' = id a1} in 
  itemLabelbgcolor''_ a1' >>= \res ->
  let {res' = cToColor res} in
  return (res')

{-# LINE 304 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Color)) ) => Op (GetItemLabelbgcolor ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> itemLabelbgcolor' treePtr
setItemLabelbgcolor' :: (Ptr ()) -> (Color) -> IO ()
setItemLabelbgcolor' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromColor a2} in 
  setItemLabelbgcolor''_ a1' a2' >>
  return ()

{-# LINE 307 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Color ->  IO ()) ) => Op (SetItemLabelbgcolor ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setItemLabelbgcolor' treePtr val
connectorcolor' :: (Ptr ()) -> IO ((Color))
connectorcolor' a1 =
  let {a1' = id a1} in 
  connectorcolor''_ a1' >>= \res ->
  let {res' = cToColor res} in
  return (res')

{-# LINE 310 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Color)) ) => Op (GetConnectorcolor ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> connectorcolor' treePtr
setConnectorcolor' :: (Ptr ()) -> (Color) -> IO ()
setConnectorcolor' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromColor a2} in 
  setConnectorcolor''_ a1' a2' >>
  return ()

{-# LINE 313 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Color ->  IO ()) ) => Op (SetConnectorcolor ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setConnectorcolor' treePtr val
marginleft' :: (Ptr ()) -> IO ((Int))
marginleft' a1 =
  let {a1' = id a1} in 
  marginleft''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 316 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetMarginleft ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> marginleft' treePtr
setMarginleft' :: (Ptr ()) -> (Int) -> IO ()
setMarginleft' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setMarginleft''_ a1' a2' >>
  return ()

{-# LINE 319 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetMarginleft ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setMarginleft' treePtr val
margintop' :: (Ptr ()) -> IO ((Int))
margintop' a1 =
  let {a1' = id a1} in 
  margintop''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 322 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetMargintop ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> margintop' treePtr
setMargintop' :: (Ptr ()) -> (Int) -> IO ()
setMargintop' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setMargintop''_ a1' a2' >>
  return ()

{-# LINE 325 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetMargintop ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setMargintop' treePtr val
linespacing' :: (Ptr ()) -> IO ((Int))
linespacing' a1 =
  let {a1' = id a1} in 
  linespacing''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 328 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetLinespacing ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> linespacing' treePtr
setLinespacing' :: (Ptr ()) -> (Int) -> IO ()
setLinespacing' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setLinespacing''_ a1' a2' >>
  return ()

{-# LINE 331 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetLinespacing ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setLinespacing' treePtr val
openchildMarginbottom' :: (Ptr ()) -> IO ((Int))
openchildMarginbottom' a1 =
  let {a1' = id a1} in 
  openchildMarginbottom''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 334 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetOpenchildMarginbottom ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> openchildMarginbottom' treePtr
setOpenchildMarginbottom' :: (Ptr ()) -> (Int) -> IO ()
setOpenchildMarginbottom' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setOpenchildMarginbottom''_ a1' a2' >>
  return ()

{-# LINE 337 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetOpenchildMarginbottom ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setOpenchildMarginbottom' treePtr val
usericonmarginleft' :: (Ptr ()) -> IO ((Int))
usericonmarginleft' a1 =
  let {a1' = id a1} in 
  usericonmarginleft''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 340 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetUsericonmarginleft ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> usericonmarginleft' treePtr
setUsericonmarginleft' :: (Ptr ()) -> (Int) -> IO ()
setUsericonmarginleft' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setUsericonmarginleft''_ a1' a2' >>
  return ()

{-# LINE 343 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetUsericonmarginleft ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setUsericonmarginleft' treePtr val
labelmarginleft' :: (Ptr ()) -> IO ((Int))
labelmarginleft' a1 =
  let {a1' = id a1} in 
  labelmarginleft''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 346 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetLabelmarginleft ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> labelmarginleft' treePtr
setLabelmarginleft' :: (Ptr ()) -> (Int) -> IO ()
setLabelmarginleft' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setLabelmarginleft''_ a1' a2' >>
  return ()

{-# LINE 349 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetLabelmarginleft ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setLabelmarginleft' treePtr val
connectorwidth' :: (Ptr ()) -> IO ((Int))
connectorwidth' a1 =
  let {a1' = id a1} in 
  connectorwidth''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 352 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetConnectorwidth ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> connectorwidth' treePtr
setConnectorwidth' :: (Ptr ()) -> (Int) -> IO ()
setConnectorwidth' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setConnectorwidth''_ a1' a2' >>
  return ()

{-# LINE 355 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetConnectorwidth ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setConnectorwidth' treePtr val
usericon' :: (Ptr ()) -> IO ((Ptr ()))
usericon' a1 =
  let {a1' = id a1} in 
  usericon''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 358 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref Image))) ) => Op (GetUsericon ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> usericon' treePtr >>= toMaybeRef
setUsericon' :: (Ptr ()) -> (Ptr ()) -> IO ()
setUsericon' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  setUsericon''_ a1' a2' >>
  return ()

{-# LINE 361 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a Image, impl ~ (Maybe( Ref a )  ->  IO ()) ) => Op (SetUsericon ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> withMaybeRef val $ \valPtr -> setUsericon' treePtr valPtr
openicon' :: (Ptr ()) -> IO ((Ptr ()))
openicon' a1 =
  let {a1' = id a1} in 
  openicon''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 364 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref Image))) ) => Op (GetOpenicon ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> openicon' treePtr >>= toMaybeRef
setOpenicon' :: (Ptr ()) -> (Ptr ()) -> IO ()
setOpenicon' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  setOpenicon''_ a1' a2' >>
  return ()

{-# LINE 367 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a Image , impl ~ (Maybe( Ref a )  ->  IO ()) ) => Op (SetOpenicon ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> withMaybeRef val $ \valPtr -> setOpenicon' treePtr valPtr
closeicon' :: (Ptr ()) -> IO ((Ptr ()))
closeicon' a1 =
  let {a1' = id a1} in 
  closeicon''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 370 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref Image))) ) => Op (GetCloseicon ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> closeicon' treePtr >>= toMaybeRef
setCloseicon' :: (Ptr ()) -> (Ptr ()) -> IO ()
setCloseicon' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  setCloseicon''_ a1' a2' >>
  return ()

{-# LINE 373 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a Image, impl ~ (Maybe( Ref a )  ->  IO ()) ) => Op (SetCloseicon ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> withMaybeRef val $ \valPtr -> setCloseicon' treePtr valPtr
showcollapse' :: (Ptr ()) -> IO ((Bool))
showcollapse' a1 =
  let {a1' = id a1} in 
  showcollapse''_ a1' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 376 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Bool)) ) => Op (GetShowcollapse ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> showcollapse' treePtr
setShowcollapse' :: (Ptr ()) -> (Bool) -> IO ()
setShowcollapse' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromBool a2} in 
  setShowcollapse''_ a1' a2' >>
  return ()

{-# LINE 379 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Bool ->  IO ()) ) => Op (SetShowcollapse ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setShowcollapse' treePtr val
showroot' :: (Ptr ()) -> IO ((Bool))
showroot' a1 =
  let {a1' = id a1} in 
  showroot''_ a1' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 382 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Bool)) ) => Op (GetShowroot ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> showroot' treePtr
setShowroot' :: (Ptr ()) -> (Bool) -> IO ()
setShowroot' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromBool a2} in 
  setShowroot''_ a1' a2' >>
  return ()

{-# LINE 385 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Bool ->  IO ()) ) => Op (SetShowroot ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setShowroot' treePtr val
connectorstyle' :: (Ptr ()) -> IO ((TreeConnector))
connectorstyle' a1 =
  let {a1' = id a1} in 
  connectorstyle''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 388 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (TreeConnector)) ) => Op (GetConnectorstyle ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> connectorstyle' treePtr
setConnectorstyle' :: (Ptr ()) -> (TreeConnector) -> IO ()
setConnectorstyle' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  setConnectorstyle''_ a1' a2' >>
  return ()

{-# LINE 391 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeConnector ->  IO ()) ) => Op (SetConnectorstyle ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setConnectorstyle' treePtr val
sortorder' :: (Ptr ()) -> IO ((TreeSort))
sortorder' a1 =
  let {a1' = id a1} in 
  sortorder''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 394 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (TreeSort)) ) => Op (GetSortorder ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> sortorder' treePtr
setSortorder' :: (Ptr ()) -> (TreeSort) -> IO ()
setSortorder' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  setSortorder''_ a1' a2' >>
  return ()

{-# LINE 397 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeSort ->  IO ()) ) => Op (SetSortorder ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setSortorder' treePtr val
selectbox' :: (Ptr ()) -> IO ((Boxtype))
selectbox' a1 =
  let {a1' = id a1} in 
  selectbox''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 400 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Boxtype)) ) => Op (GetSelectbox ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> selectbox' treePtr
setSelectbox' :: (Ptr ()) -> (Boxtype) -> IO ()
setSelectbox' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  setSelectbox''_ a1' a2' >>
  return ()

{-# LINE 403 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Boxtype ->  IO ()) ) => Op (SetSelectbox ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setSelectbox' treePtr val
selectmode' :: (Ptr ()) -> IO ((TreeSelect))
selectmode' a1 =
  let {a1' = id a1} in 
  selectmode''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 406 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (TreeSelect)) ) => Op (Selectmode ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> selectmode' treePtr
setSelectmode' :: (Ptr ()) -> (TreeSelect) -> IO ()
setSelectmode' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  setSelectmode''_ a1' a2' >>
  return ()

{-# LINE 409 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeSelect ->  IO ()) ) => Op (SetSelectmode ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setSelectmode' treePtr val
displayed' :: (Ptr ()) -> (Ptr ()) -> IO ((Bool))
displayed' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  displayed''_ a1' a2' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 412 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO (Bool)) ) => Op (Displayed ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> displayed' treePtr itemPtr
showItemWithYoff' :: (Ptr ()) -> (Ptr ()) -> (Int) -> IO ()
showItemWithYoff' a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = fromIntegral a3} in 
  showItemWithYoff''_ a1' a2' a3' >>
  return ()

{-# LINE 415 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

showItem' :: (Ptr ()) -> (Ptr ()) -> IO ()
showItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  showItem''_ a1' a2' >>
  return ()

{-# LINE 416 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  -> Maybe Y ->  IO ()) ) => Op (ShowItemWithYoff ()) TreeBase orig impl where
  runOp _ _ tree item yoff =
    withRef tree $ \treePtr ->
    withRef item $ \itemPtr ->
    case yoff of
      Just (Y y') -> showItemWithYoff' treePtr itemPtr y'
      Nothing -> showItem' treePtr itemPtr
showItemTop' :: (Ptr ()) -> (Ptr ()) -> IO ()
showItemTop' :: Ptr () -> Ptr () -> IO ()
showItemTop' a1 a2 :: Ptr ()
a2 =
  let {a1' = id a1} in 
  let {a2' :: Ptr ()
a2' = Ptr () -> Ptr ()
forall a. a -> a
id Ptr ()
a2} in 
  Ptr () -> Ptr () -> IO ()
showItemTop''_ Ptr ()
a1' Ptr ()
a2' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 424 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (ShowItemTop ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> showItemTop' treePtr itemPtr
showItemMiddle' :: (Ptr ()) -> (Ptr ()) -> IO ()
showItemMiddle' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  showItemMiddle''_ a1' a2' >>
  return ()

{-# LINE 427 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (ShowItemMiddle ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> showItemMiddle' treePtr itemPtr
showItemBottom' :: (Ptr ()) -> (Ptr ()) -> IO ()
showItemBottom' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  showItemBottom''_ a1' a2' >>
  return ()

{-# LINE 430 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (ShowItemBottom ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> showItemBottom' treePtr itemPtr
display' :: (Ptr ()) -> (Ptr ()) -> IO ()
display' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  display''_ a1' a2' >>
  return ()

{-# LINE 433 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Ref TreeItem  ->  IO ()) ) => Op (Display ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> display' treePtr itemPtr
vposition' :: (Ptr ()) -> IO ((Int))
vposition' a1 =
  let {a1' = id a1} in 
  vposition''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 436 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetVposition ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> vposition' treePtr
setVposition' :: (Ptr ()) -> (Int) -> IO ()
setVposition' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setVposition''_ a1' a2' >>
  return ()

{-# LINE 439 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetVposition ()) TreeBase orig impl where
  runOp _ _ tree pos = withRef tree $ \treePtr -> setVposition' treePtr pos
isScrollbar' :: (Ptr ()) -> (Ptr ()) -> IO ((Bool))
isScrollbar' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  isScrollbar''_ a1' a2' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 442 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a WidgetBase, impl ~ (Ref a  ->  IO (Bool)) ) => Op (IsScrollbar ()) TreeBase orig impl where
  runOp _ _ tree w = withRef tree $ \treePtr -> withRef w $ \wPtr -> isScrollbar' treePtr wPtr
scrollbarSize' :: (Ptr ()) -> IO ((Int))
scrollbarSize' a1 =
  let {a1' = id a1} in 
  scrollbarSize''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 445 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (IO (Int)) ) => Op (GetScrollbarSize ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> scrollbarSize' treePtr
setScrollbarSize' :: (Ptr ()) -> (Int) -> IO ()
setScrollbarSize' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setScrollbarSize''_ a1' a2' >>
  return ()

{-# LINE 448 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetScrollbarSize ()) TreeBase orig impl where
  runOp _ _ tree size = withRef tree $ \treePtr -> setScrollbarSize' treePtr size
isVscrollVisible' :: (Ptr ()) -> IO ((Bool))
isVscrollVisible' a1 =
  let {a1' = id a1} in 
  isVscrollVisible''_ a1' >>= \res ->
  let {res' = cToBool res} in
  return (res')

{-# LINE 451 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Bool)) ) => Op (IsVscrollVisible ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> isVscrollVisible' treePtr
setCallbackItem' :: (Ptr ()) -> (Ptr ()) -> IO ()
setCallbackItem' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  setCallbackItem''_ a1' a2' >>
  return ()

{-# LINE 454 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (Parent a TreeItem, impl ~ (Ref a ->  IO ()) ) => Op (SetCallbackItem ()) TreeBase orig impl where
  runOp _ _ tree item = withRef tree $ \treePtr -> withRef item $ \itemPtr -> setCallbackItem' treePtr itemPtr
callbackItem' :: (Ptr ()) -> IO ((Ptr ()))
callbackItem' a1 =
  let {a1' = id a1} in 
  callbackItem''_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 457 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Maybe (Ref TreeItem))) ) => Op (GetCallbackItem ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> callbackItem' treePtr >>= toMaybeRef
setCallbackReason' :: (Ptr ()) -> (TreeReasonType) -> IO ()
setCallbackReason' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  setCallbackReason''_ a1' a2' >>
  return ()

{-# LINE 460 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeReasonType ->  IO ()) ) => Op (SetCallbackReason ()) TreeBase orig impl where
  runOp _ _ tree reason = withRef tree $ \treePtr -> setCallbackReason' treePtr reason
callbackReason' :: (Ptr ()) -> IO ((TreeReasonType))
callbackReason' a1 =
  let {a1' = id a1} in 
  callbackReason''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 463 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (TreeReasonType)) ) => Op (GetCallbackReason ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> callbackReason' treePtr
recalcTree' :: (Ptr ()) -> IO ((()))
recalcTree' a1 =
  let {a1' = id a1} in 
  recalcTree''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 466 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO ())) => Op (RecalcTree ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> recalcTree' treePtr
marginbottom' :: (Ptr ()) -> IO ((Int))
marginbottom' a1 =
  let {a1' = id a1} in 
  marginbottom''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 469 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetMarginbottom ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> marginbottom' treePtr
setMarginbottom' :: (Ptr ()) -> (Int) -> IO ()
setMarginbottom' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setMarginbottom''_ a1' a2' >>
  return ()

{-# LINE 472 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetMarginbottom ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setMarginbottom' treePtr val
widgetmarginleft' :: (Ptr ()) -> IO ((Int))
widgetmarginleft' a1 =
  let {a1' = id a1} in 
  widgetmarginleft''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 475 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (Int)) ) => Op (GetWidgetmarginleft ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> widgetmarginleft' treePtr
setWidgetmarginleft' :: (Ptr ()) -> (Int) -> IO ()
setWidgetmarginleft' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setWidgetmarginleft''_ a1' a2' >>
  return ()

{-# LINE 478 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Int ->  IO ()) ) => Op (SetWidgetmarginleft ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setWidgetmarginleft' treePtr val
item_reselect_mode' :: (Ptr ()) -> IO ((TreeItemReselectMode))
item_reselect_mode' a1 =
  let {a1' = id a1} in 
  item_reselect_mode''_ a1' >>= \res ->
  let {res' = cToEnum res} in
  return (res')

{-# LINE 481 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO (TreeItemReselectMode)) ) => Op (GetItemReselectMode ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> item_reselect_mode' treePtr
setItem_Reselect_Mode' :: (Ptr ()) -> (TreeItemReselectMode) -> IO ()
setItem_Reselect_Mode' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = cFromEnum a2} in 
  setItem_Reselect_Mode''_ a1' a2' >>
  return ()

{-# LINE 484 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (TreeItemReselectMode ->  IO ()) ) => Op (SetItemReselectMode ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setItem_Reselect_Mode' treePtr val
item_draw_mode' :: (Ptr ()) -> IO ((CInt))
item_draw_mode' a1 =
  let {a1' = id a1} in 
  item_draw_mode''_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 487 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ( IO ([TreeItemDrawMode])) ) => Op (GetItemDrawMode ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> item_draw_mode' treePtr >>= return . extract allTreeItemDrawModes
setItem_Draw_Mode' :: (Ptr ()) -> (CInt) -> IO ()
setItem_Draw_Mode' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  setItem_Draw_Mode''_ a1' a2' >>
  return ()

{-# LINE 490 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ ([TreeItemDrawMode] ->  IO ()) ) => Op (SetItemDrawMode ()) TreeBase orig impl where
  runOp _ _ tree val = withRef tree $ \treePtr -> setItem_Draw_Mode' treePtr (fromIntegral (combine val))


drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
  let {a1' = id a1} in 
  drawSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 495 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

drawTreeBase ::  Ref TreeBase -> IO ()
drawTreeBase tree = withRef tree $ \treePtr -> drawSuper' treePtr
handleSuper' :: (Ptr ()) -> (Int) -> IO ((Int))
handleSuper' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  handleSuper''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 498 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

handleTreeBase :: Ref TreeBase -> Event ->  IO (Either UnknownEvent ())
handleTreeBase tree event = withRef tree $ \treePtr -> handleSuper' treePtr (fromIntegral (fromEnum event)) >>= return . successOrUnknownEvent
resizeSuper' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((()))
resizeSuper' a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = fromIntegral a4} in 
  let {a5' = fromIntegral a5} in 
  resizeSuper''_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 501 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

resizeTreeBase :: Ref TreeBase -> Rectangle -> IO ()
resizeTreeBase tree rectangle =
    let (x_pos, y_pos, width, height) = fromRectangle rectangle
    in withRef tree $ \treePtr -> resizeSuper' treePtr x_pos y_pos width height
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
  let {a1' = id a1} in 
  hideSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 506 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

hideTreeBase ::  Ref TreeBase -> IO ()
hideTreeBase tree = withRef tree $ \treePtr -> hideSuper' treePtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
  let {a1' = id a1} in 
  showSuper''_ a1' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 509 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

showWidgetTreeBase ::  Ref TreeBase -> IO ()
showWidgetTreeBase tree = withRef tree $ \treePtr -> showSuper' treePtr

draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
  let {a1' = id a1} in 
  draw'''_ a1' >>
  return ()

{-# LINE 513 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (  IO ())) => Op (Draw ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> draw'' treePtr
treeHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
treeHandle' a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  treeHandle''_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 516 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (Handle ()) TreeBase orig impl where
  runOp _ _ tree event = withRef tree (\p -> treeHandle' p (fromIntegral . fromEnum $ event)) >>= return  . successOrUnknownEvent
show' :: (Ptr ()) -> IO ()
show' a1 =
  let {a1' = id a1} in 
  show''_ a1' >>
  return ()

{-# LINE 519 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (  IO ())) => Op (ShowWidget ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> show' treePtr
hide' :: (Ptr ()) -> IO ()
hide' a1 =
  let {a1' = id a1} in 
  hide''_ a1' >>
  return ()

{-# LINE 522 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (  IO ())) => Op (Hide ()) TreeBase orig impl where
  runOp _ _ tree = withRef tree $ \treePtr -> hide' treePtr
resize' :: (Ptr ()) -> (Int) -> (Int) -> (Int) -> (Int) -> IO ((()))
resize' a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = fromIntegral a4} in 
  let {a5' = fromIntegral a5} in 
  resize''_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = supressWarningAboutRes res} in
  return (res')

{-# LINE 525 "src/Graphics/UI/FLTK/LowLevel/Base/Tree.chs" #-}

instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) TreeBase orig impl where
  runOp _ _ tree rectangle = withRef tree $ \treePtr -> do
                                 let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
                                 resize' treePtr x_pos y_pos w_pos h_pos


-- $hierarchy
-- @
-- "Graphics.UI.FLTK.LowLevel.Base.Widget"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.Group"
--  |
--  v
-- "Graphics.UI.FLTK.LowLevel.Base.Tree"
-- @

-- $functions
-- @
-- add :: 'Ref' 'TreeBase' -> 'T.Text' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- addAt:: ('Parent' a 'TreeItem') => 'Ref' 'TreeBase' -> 'T.Text' -> 'Ref' a -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- clear :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- clearChildren:: ('Parent' a 'TreeItem') => 'Ref' 'TreeBase' -> 'Ref' a -> 'IO' ()
--
-- close :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'IO' ()
--
-- closeAndCallback :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'Bool' -> 'IO' ()
--
-- deselect :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'IO' ('Either' 'NoChange' ())
--
-- deselectAll :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- deselectAllAndCallback :: 'Ref' 'TreeBase' -> 'Maybe' ('Ref' 'TreeItem') -> 'Bool' -> 'IO' ()
--
-- deselectAndCallback :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'Bool' -> 'IO' ()
--
-- destroy :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- display :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- displayed :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ('Bool')
--
-- draw :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- findItem :: 'Ref' 'TreeBase' -> 'T.Text' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- firstSelectedItem :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- firstVisible :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- getCallbackItem :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- getCallbackReason :: 'Ref' 'TreeBase' -> 'IO' ('TreeReasonType')
--
-- getCloseicon :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'Image'))
--
-- getConnectorcolor :: 'Ref' 'TreeBase' -> 'IO' ('Color')
--
-- getConnectorstyle :: 'Ref' 'TreeBase' -> 'IO' ('TreeConnector')
--
-- getConnectorwidth :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getFirst :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- getItemDrawMode :: 'Ref' 'TreeBase' -> 'IO' (['TreeItemDrawMode')]
--
-- getItemFocus :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- getItemLabelbgcolor :: 'Ref' 'TreeBase' -> 'IO' ('Color')
--
-- getItemLabelfgcolor :: 'Ref' 'TreeBase' -> 'IO' ('Color')
--
-- getItemLabelfont :: 'Ref' 'TreeBase' -> 'IO' ('Font')
--
-- getItemLabelsize :: 'Ref' 'TreeBase' -> 'IO' ('FontSize')
--
-- getItemReselectMode :: 'Ref' 'TreeBase' -> 'IO' ('TreeItemReselectMode')
--
-- getLabelmarginleft :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getLast :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- getLinespacing :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getMarginbottom :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getMarginleft :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getMargintop :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getOpenchildMarginbottom :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getOpenicon :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'Image'))
--
-- getScrollbarSize :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getSelectbox :: 'Ref' 'TreeBase' -> 'IO' ('Boxtype')
--
-- getShowcollapse :: 'Ref' 'TreeBase' -> 'IO' ('Bool')
--
-- getShowroot :: 'Ref' 'TreeBase' -> 'IO' ('Bool')
--
-- getSortorder :: 'Ref' 'TreeBase' -> 'IO' ('TreeSort')
--
-- getUsericon :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'Image'))
--
-- getUsericonmarginleft :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getVposition :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- getWidgetmarginleft :: 'Ref' 'TreeBase' -> 'IO' ('Int')
--
-- handle :: 'Ref' 'TreeBase' -> 'Event' -> 'IO' ('Either' 'UnknownEvent' ())
--
-- hide :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- insert:: ('Parent' a 'TreeItem') => 'Ref' 'TreeBase' -> 'Ref' a -> 'T.Text' -> 'AtIndex' -> 'IO' ('Maybe' ('Ref' a))
--
-- insertAbove:: ('Parent' a 'TreeItem') => 'Ref' 'TreeBase' -> 'Ref' a -> 'T.Text' -> 'IO' ('Maybe' ('Ref' a))
--
-- isClose :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'IO' ('Bool')
--
-- isOpen :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'IO' ('Bool')
--
-- isScrollbar:: ('Parent' a 'WidgetBase') => 'Ref' 'TreeBase' -> 'Ref' a -> 'IO' ('Bool')
--
-- isSelected :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'IO' ('Bool')
--
-- isVscrollVisible :: 'Ref' 'TreeBase' -> 'IO' ('Bool')
--
-- itemClicked :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- itemPathname:: ('Parent' a 'TreeItem') => 'Ref' 'TreeBase' -> 'Ref' a -> 'IO' ('Maybe' 'T.Text')
--
-- lastSelectedItem :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- lastVisible :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- next :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- nextAfterItem :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- nextItem :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'Maybe' 'SearchDirection' -> 'Bool' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- nextSelectedItem :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- nextSelectedItemAfterItem :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'Maybe' 'SearchDirection' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- open :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'IO' ()
--
-- openAndCallback :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'Bool' -> 'IO' ()
--
-- openToggle :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- openToggleAndCallback :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'Bool' -> 'IO' ()
--
-- prev :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- prevBeforeItem :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- recalcTree :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- remove :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ('Either' 'TreeItemNotFound' ())
--
-- resize :: 'Ref' 'TreeBase' -> 'Rectangle' -> 'IO' ()
--
-- root :: 'Ref' 'TreeBase' -> 'IO' ('Maybe' ('Ref' 'TreeItem'))
--
-- rootLabel :: 'Ref' 'TreeBase' -> 'T.Text' -> 'IO' ()
--
-- select :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'IO' ('Either' 'NoChange' ())
--
-- selectAll :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- selectAllAndCallback :: 'Ref' 'TreeBase' -> 'Maybe' ('Ref' 'TreeItem') -> 'Bool' -> 'IO' ()
--
-- selectAndCallback :: 'Ref' 'TreeBase' -> 'TreeItemLocator' -> 'Bool' -> 'IO' ()
--
-- selectOnly :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- selectOnlyAndCallback :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'Bool' -> 'IO' ()
--
-- selectToggle :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- selectToggleAndCallback :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'Bool' -> 'IO' ()
--
-- selectmode :: 'Ref' 'TreeBase' -> 'IO' ('TreeSelect')
--
-- setCallbackItem:: ('Parent' a 'TreeItem') => 'Ref' 'TreeBase' -> 'Ref' a -> 'IO' ()
--
-- setCallbackReason :: 'Ref' 'TreeBase' -> 'TreeReasonType' -> 'IO' ()
--
-- setCloseicon:: ('Parent' a 'Image') => 'Ref' 'TreeBase' -> 'Maybe'( 'Ref' a ) -> 'IO' ()
--
-- setConnectorcolor :: 'Ref' 'TreeBase' -> 'Color' -> 'IO' ()
--
-- setConnectorstyle :: 'Ref' 'TreeBase' -> 'TreeConnector' -> 'IO' ()
--
-- setConnectorwidth :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setItemDrawMode :: 'Ref' 'TreeBase' -> ['TreeItemDrawMode'] -> 'IO' ()
--
-- setItemFocus :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- setItemLabelbgcolor :: 'Ref' 'TreeBase' -> 'Color' -> 'IO' ()
--
-- setItemLabelfgcolor :: 'Ref' 'TreeBase' -> 'Color' -> 'IO' ()
--
-- setItemLabelfont :: 'Ref' 'TreeBase' -> 'Font' -> 'IO' ()
--
-- setItemLabelsize :: 'Ref' 'TreeBase' -> 'FontSize' -> 'IO' ()
--
-- setItemReselectMode :: 'Ref' 'TreeBase' -> 'TreeItemReselectMode' -> 'IO' ()
--
-- setLabelmarginleft :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setLinespacing :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setMarginbottom :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setMarginleft :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setMargintop :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setOpenchildMarginbottom :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setOpenicon:: ('Parent' a 'Image') => 'Ref' 'TreeBase' -> 'Maybe'( 'Ref' a ) -> 'IO' ()
--
-- setScrollbarSize :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setSelectbox :: 'Ref' 'TreeBase' -> 'Boxtype' -> 'IO' ()
--
-- setSelectmode :: 'Ref' 'TreeBase' -> 'TreeSelect' -> 'IO' ()
--
-- setShowcollapse :: 'Ref' 'TreeBase' -> 'Bool' -> 'IO' ()
--
-- setShowroot :: 'Ref' 'TreeBase' -> 'Bool' -> 'IO' ()
--
-- setSortorder :: 'Ref' 'TreeBase' -> 'TreeSort' -> 'IO' ()
--
-- setUsericon:: ('Parent' a 'Image') => 'Ref' 'TreeBase' -> 'Maybe'( 'Ref' a ) -> 'IO' ()
--
-- setUsericonmarginleft :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setVposition :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- setWidgetmarginleft :: 'Ref' 'TreeBase' -> 'Int' -> 'IO' ()
--
-- showItemBottom :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- showItemMiddle :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- showItemTop :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'IO' ()
--
-- showItemWithYoff :: 'Ref' 'TreeBase' -> 'Ref' 'TreeItem' -> 'Maybe' 'Y' -> 'IO' ()
--
-- showSelf :: 'Ref' 'TreeBase' -> 'IO' ()
--
-- showWidget :: 'Ref' 'TreeBase' -> 'IO' ()
-- @

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_OverriddenTree_New_WithLabel"
  overriddenWidgetNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ()))))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_OverriddenTree_New"
  overriddenWidgetNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_New"
  treeNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_New_WithLabel"
  treeNewWithLabel''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_Destroy"
  treeDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show_self"
  showSelf''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_root_label"
  rootLabel''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_root"
  root''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_add"
  add''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_add_with_item_name"
  addWithItemName''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_insert_above"
  insertAbove''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ())))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_insert"
  insert''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_remove"
  remove''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_clear"
  clear''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_clear_children"
  clearChildren''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_find_item"
  findItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (C2HSImp.Ptr ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_pathname"
  itemPathname''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_clicked"
  itemClicked''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_first"
  first''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_first_visible"
  firstVisible''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_next"
  next''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_next_with_item"
  nextWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_next_item"
  nextItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ()))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_prev"
  prev''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_prev_with_item"
  prevWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_last"
  last''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_last_visible"
  lastVisible''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_first_selected_item"
  firstSelectedItem''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_last_selected_item"
  lastSelectedItem''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_next_selected_item"
  nextSelectedItem''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_next_selected_item_with_item_direction"
  nextSelectedItemWithItemDirection''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr ())))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_open_with_item"
  openWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_open_with_item_docallback"
  openWithItemDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_open_with_path"
  openWithPath''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_open_with_path_docallback"
  openWithPathDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_open_toggle"
  openToggle''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_open_toggle_with_docallback"
  openToggleWithDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_close_with_item"
  closeWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_close_with_item_docallback"
  closeWithItemDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_close_with_path"
  closeWithPath''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_close_with_path_docallback"
  closeWithPathDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_open_with_item"
  isOpenWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_open_with_path"
  isOpenWithPath''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_close_with_item"
  isCloseWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_close_with_path"
  isCloseWithPath''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_with_item"
  selectWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_with_item_docallback"
  selectWithItemDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_with_path"
  selectWithPath''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_with_path_docallback"
  selectWithPathDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_toggle"
  selectToggle''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_toggle_with_docallback"
  selectToggleWithDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_deselect_with_item"
  deselectWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_deselect_with_item_docallback"
  deselectWithItemDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_deselect_with_path"
  deselectWithPath''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_deselect_with_path_docallback"
  deselectWithPathDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_only"
  selectOnly''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_only_with_docallback"
  selectOnlyWithDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_all"
  selectAll''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_select_all_with_docallback"
  selectAllWithDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_deselect_all_with_item"
  deselectAll''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_deselect_all_with_item_docallback"
  deselectAllWithDocallback''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_item_focus"
  setItemFocus''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_get_item_focus"
  getItemFocus''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_selected_with_item"
  isSelectedWithItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_selected_with_path"
  isSelectedWithPath''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_labelfont"
  itemLabelfont''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_item_labelfont"
  itemSetLabelfont''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_labelsize"
  itemLabelsize''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_item_labelsize"
  itemSetLabelsize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_labelfgcolor"
  itemLabelfgcolor''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_item_labelfgcolor"
  setItemLabelfgcolor''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_labelbgcolor"
  itemLabelbgcolor''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_item_labelbgcolor"
  setItemLabelbgcolor''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_connectorcolor"
  connectorcolor''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CUInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_connectorcolor"
  setConnectorcolor''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_marginleft"
  marginleft''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_marginleft"
  setMarginleft''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_margintop"
  margintop''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_margintop"
  setMargintop''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_linespacing"
  linespacing''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_linespacing"
  setLinespacing''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_openchild_marginbottom"
  openchildMarginbottom''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_openchild_marginbottom"
  setOpenchildMarginbottom''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_usericonmarginleft"
  usericonmarginleft''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_usericonmarginleft"
  setUsericonmarginleft''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_labelmarginleft"
  labelmarginleft''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_labelmarginleft"
  setLabelmarginleft''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_connectorwidth"
  connectorwidth''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_connectorwidth"
  setConnectorwidth''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_usericon"
  usericon''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_usericon"
  setUsericon''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_openicon"
  openicon''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_openicon"
  setOpenicon''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_closeicon"
  closeicon''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_closeicon"
  setCloseicon''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_showcollapse"
  showcollapse''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_showcollapse"
  setShowcollapse''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_showroot"
  showroot''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_showroot"
  setShowroot''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_connectorstyle"
  connectorstyle''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_connectorstyle"
  setConnectorstyle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_sortorder"
  sortorder''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_sortorder"
  setSortorder''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_selectbox"
  selectbox''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_selectbox"
  setSelectbox''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_selectmode"
  selectmode''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_selectmode"
  setSelectmode''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_displayed"
  displayed''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show_item_with_yoff"
  showItemWithYoff''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ()))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show_item"
  showItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show_item_top"
  showItemTop''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show_item_middle"
  showItemMiddle''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show_item_bottom"
  showItemBottom''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_display"
  display''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_vposition"
  vposition''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_vposition"
  setVposition''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_scrollbar"
  isScrollbar''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_scrollbar_size"
  scrollbarSize''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_scrollbar_size"
  setScrollbarSize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_is_vscroll_visible"
  isVscrollVisible''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_callback_item"
  setCallbackItem''_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_callback_item"
  callbackItem''_ :: ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_callback_reason"
  setCallbackReason''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_callback_reason"
  callbackReason''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_recalc_tree"
  recalcTree''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_marginbottom"
  marginbottom''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_marginbottom"
  setMarginbottom''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_widgetmarginleft"
  widgetmarginleft''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_widgetmarginleft"
  setWidgetmarginleft''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_reselect_mode"
  item_reselect_mode''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_item_reselect_mode"
  setItem_Reselect_Mode''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_item_draw_mode"
  item_draw_mode''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_set_item_draw_mode"
  setItem_Draw_Mode''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_draw_super"
  drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_handle_super"
  handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_resize_super"
  resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_hide_super"
  hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show_super"
  showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_draw"
  draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_handle"
  treeHandle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_show"
  show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_hide"
  hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Base/Tree.chs.h Fl_Tree_resize"
  resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))