{-# LINE 1 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
{-# LANGUAGE CPP, ExistentialQuantification, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Graphics.UI.FLTK.LowLevel.TableRow
(
tableRowNew,
TableRowSelectFlag(..)
)
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_Types
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
import Graphics.UI.FLTK.LowLevel.Widget
import Graphics.UI.FLTK.LowLevel.Table
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified Data.Text as T
data TableRowSelectFlag = TableRowSelect | TableRowDeselect | TableRowToggle
tableRowNew' :: (Int) -> (Int) -> (Int) -> (Int) -> (Ptr ()) -> IO ((Ptr ()))
tableRowNew' 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
tableRowNew''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 32 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
tableRowNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (T.Text) -> (Ptr ()) -> IO ((Ptr ()))
tableRowNewWithLabel' 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
let {a5' = unsafeToCString a5} in
let {a6' = id a6} in
tableRowNewWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 33 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
tableRowNew :: Rectangle -> Maybe T.Text -> Maybe (Ref TableRow -> IO ()) -> (Ref TableRow -> TableContext -> TableCoordinate -> Rectangle -> IO ()) -> CustomWidgetFuncs TableRow -> CustomTableFuncs TableRow -> IO (Ref TableRow)
tableRowNew rectangle label' draw' drawCell' customWidgetFuncs' customTableFuncs' =
do
let (x_pos, y_pos, width, height) = fromRectangle rectangle
ptr <- tableCustomFunctionStruct draw' (Just drawCell') customWidgetFuncs' customTableFuncs'
case label' of
(Just l') -> tableRowNewWithLabel' x_pos y_pos width height l' ptr >>= toRef
Nothing -> tableRowNew' x_pos y_pos width height ptr >>= toRef
tableRowDestroy' :: (Ptr ()) -> IO ((()))
tableRowDestroy' a1 =
let {a1' = id a1} in
tableRowDestroy''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 43 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (IO ())) => Op (Destroy ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> tableRowDestroy' tableRowPtr
rows' :: (Ptr ()) -> IO ((Int))
rows' a1 =
let {a1' = id a1} in
rows''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 46 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO (Int))) => Op (GetRows ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> rows' tableRowPtr
tableRowSetType' :: (Ptr ()) -> (TableRowSelectMode) -> IO ()
tableRowSetType' a1 a2 =
let {a1' = id a1} in
let {a2' = cFromEnum a2} in
tableRowSetType''_ a1' a2' >>
return ()
{-# LINE 49 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (TableRowSelectMode -> IO ())) => Op (SetType ()) TableRow orig impl where
runOp _ _ tableRow selectionMode = withRef tableRow $ \tableRowPtr' -> tableRowSetType' tableRowPtr' selectionMode
tableRowType :: (Ptr ()) -> IO ((TableRowSelectMode))
tableRowType a1 =
let {a1' = id a1} in
tableRowType'_ a1' >>= \res ->
let {res' = cToEnum res} in
return (res')
{-# LINE 52 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (IO TableRowSelectMode)) => Op (GetType_ ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr' -> tableRowType tableRowPtr'
setRows' :: (Ptr ()) -> (Int) -> IO ()
setRows' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setRows''_ a1' a2' >>
return ()
{-# LINE 55 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Int -> IO ())) => Op (SetRows ()) TableRow orig impl where
runOp _ _ table val = withRef table $ \tablePtr -> setRows' tablePtr val
setCols' :: (Ptr ()) -> (Int) -> IO ()
setCols' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setCols''_ a1' a2' >>
return ()
{-# LINE 58 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Int -> IO ())) => Op (SetCols ()) TableRow orig impl where
runOp _ _ table val = withRef table $ \tablePtr -> setCols' tablePtr val
clearSuper' :: (Ptr ()) -> IO ()
clearSuper' a1 =
let {a1' = id a1} in
clearSuper''_ a1' >>
return ()
{-# LINE 61 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (ClearSuper ()) TableRow orig impl where
runOp _ _ table = withRef table $ \tablePtr -> clearSuper' tablePtr
clear' :: (Ptr ()) -> IO ()
clear' a1 =
let {a1' = id a1} in
clear''_ a1' >>
return ()
{-# LINE 64 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (Clear ()) TableRow orig impl where
runOp _ _ table = withRef table $ \tablePtr -> clear' tablePtr
setRowsSuper' :: (Ptr ()) -> (Int) -> IO ()
setRowsSuper' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setRowsSuper''_ a1' a2' >>
return ()
{-# LINE 67 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Int -> IO ())) => Op (SetRowsSuper ()) TableRow orig impl where
runOp _ _ table val = withRef table $ \tablePtr -> setRowsSuper' tablePtr val
setColsSuper' :: (Ptr ()) -> (Int) -> IO ()
setColsSuper' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
setColsSuper''_ a1' a2' >>
return ()
{-# LINE 70 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Int -> IO ())) => Op (SetColsSuper ()) TableRow orig impl where
runOp _ _ table val = withRef table $ \tablePtr -> setColsSuper' tablePtr val
handleSuper' :: (Ptr ()) -> (Event) -> IO ((Int))
handleSuper' a1 a2 =
let {a1' = id a1} in
let {a2' = cFromEnum a2} in
handleSuper''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 73 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Event -> IO (Either UnknownEvent ()))) => Op (HandleSuper ()) TableRow orig impl where
runOp _ _ table event = withRef table $ \tablePtr -> handleSuper' tablePtr event >>= return . successOrUnknownEvent
handle' :: (Ptr ()) -> (Event) -> IO ((Int))
handle' a1 a2 =
let {a1' = id a1} in
let {a2' = cFromEnum a2} in
handle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
{-# LINE 76 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Event -> IO(Either UnknownEvent ()))) => Op (Handle ()) TableRow orig impl where
runOp _ _ table event = withRef table $ \tablePtr -> handle' tablePtr 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' >>
return ()
{-# LINE 79 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (ResizeSuper ()) TableRow orig impl where
runOp _ _ table rectangle = let (x_pos', y_pos', width', height') = fromRectangle rectangle in withRef table $ \tablePtr -> resizeSuper' tablePtr x_pos' y_pos' width' height'
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' >>
return ()
{-# LINE 82 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ (Rectangle -> IO ())) => Op (Resize ()) TableRow orig impl where
runOp _ _ table rectangle = let (x_pos', y_pos', width', height') = fromRectangle rectangle in withRef table $ \tablePtr -> resize' tablePtr x_pos' y_pos' width' height'
rowSelected' :: (Ptr ()) -> (Int) -> IO ((CInt))
rowSelected' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
rowSelected''_ a1' a2' >>= \res ->
let {res' = id res} in
return (res')
{-# LINE 85 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( Int -> IO (Either OutOfRange Bool))) => Op (GetRowSelected ()) TableRow orig impl where
runOp _ _ table idx' = withRef table $ \tablePtr -> do
ret' <- rowSelected' tablePtr idx'
if ret' == -1 then (return $ Left OutOfRange) else (return $ Right $ cToBool ret')
selectAllRows' :: (Ptr ()) -> (Int) -> IO ()
selectAllRows' a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
selectAllRows''_ a1' a2' >>
return ()
{-# LINE 90 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( TableRowSelectFlag -> IO ())) => Op (SelectAllRows ()) TableRow orig impl where
runOp _ _ table flag' = withRef table $
\tablePtr ->
case flag' of
TableRowSelect -> selectAllRows' tablePtr 1
TableRowDeselect -> selectAllRows' tablePtr 0
TableRowToggle -> selectAllRows' tablePtr 2
draw'' :: (Ptr ()) -> IO ()
draw'' a1 =
let {a1' = id a1} in
draw'''_ a1' >>
return ()
{-# LINE 98 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (Draw ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> draw'' tableRowPtr
drawSuper' :: (Ptr ()) -> IO ((()))
drawSuper' a1 =
let {a1' = id a1} in
drawSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 101 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (DrawSuper ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> drawSuper' tableRowPtr
hide' :: (Ptr ()) -> IO ()
hide' a1 =
let {a1' = id a1} in
hide''_ a1' >>
return ()
{-# LINE 104 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (Hide ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> hide' tableRowPtr
hideSuper' :: (Ptr ()) -> IO ((()))
hideSuper' a1 =
let {a1' = id a1} in
hideSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 107 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (HideSuper ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> hideSuper' tableRowPtr
show' :: (Ptr ()) -> IO ()
show' a1 =
let {a1' = id a1} in
show''_ a1' >>
return ()
{-# LINE 110 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidget ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> show' tableRowPtr
showSuper' :: (Ptr ()) -> IO ((()))
showSuper' a1 =
let {a1' = id a1} in
showSuper''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
{-# LINE 113 "src/Graphics/UI/FLTK/LowLevel/TableRow.chs" #-}
instance (impl ~ ( IO ())) => Op (ShowWidgetSuper ()) TableRow orig impl where
runOp _ _ tableRow = withRef tableRow $ \tableRowPtr -> showSuper' tableRowPtr
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_OverriddenTable_Row_New"
tableRowNew''_ :: (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_OverriddenTable_Row_New_WithLabel"
tableRowNewWithLabel''_ :: (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/TableRow.chs.h Fl_Table_Row_Destroy"
tableRowDestroy''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_rows"
rows''_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_set_type"
tableRowSetType''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_type"
tableRowType'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_set_rows"
setRows''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_set_cols"
setCols''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_clear_super"
clearSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_clear"
clear''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_set_rows_super"
setRowsSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_set_cols_super"
setColsSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_handle_super"
handleSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_handle"
handle''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_resize_super"
resizeSuper''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_resize"
resize''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (C2HSImp.CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_row_selected"
rowSelected''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_select_all_rows_with_flag"
selectAllRows''_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_draw"
draw'''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_draw_super"
drawSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_hide"
hide''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_hide_super"
hideSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_show"
show''_ :: ((C2HSImp.Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/TableRow.chs.h Fl_Table_Row_show_super"
showSuper''_ :: ((C2HSImp.Ptr ()) -> (IO ()))