implementation module Gtk.Widgets.Sheet /** * This module provides support for GtkSheet; a spreadsheet widget. See * https://fpaquet.github.io/gtksheet/ for more details and installation * instructions. Use the 'Gtk with GtkSheet' environment. */ import Control.Monad import Control.Monad.Identity import Control.Monad.State import System._Pointer import Gtk import qualified Gtk.Widgets.Sheet.Internal as I :: GtkSheet :== Pointer instance gtkWidget GtkSheet where gtkWidget s = fromPtr s instance gtkContainer GtkSheet where gtkContainer s = fromPtr s newSheet :: !Int !Int !String -> GtkM GtkSheet newSheet nrows ncols title = toStateR ('I'.gtk_sheet_new nrows ncols title) >>= show