diff options
Diffstat (limited to 'src/Gtk/Widgets/Sheet.icl')
-rw-r--r-- | src/Gtk/Widgets/Sheet.icl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Gtk/Widgets/Sheet.icl b/src/Gtk/Widgets/Sheet.icl new file mode 100644 index 0000000..9d8a50c --- /dev/null +++ b/src/Gtk/Widgets/Sheet.icl @@ -0,0 +1,24 @@ +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 |