definition 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. * * Note that the C library is slightly buggy. */ from StdMaybe import :: Maybe from System._Pointer import :: Pointer from Gtk.State import :: GtkM from Gtk.Tune import class tune from Gtk.Types import :: GtkCSSClass, :: GtkJustification from Gtk.Widgets import class gtkWidget, :: GtkWidget, class gtkContainer, :: GtkContainer, :: GtkEntry import Gtk.Widgets.Sheet.Signal :: GtkSheet (=: GtkSheet Pointer) instance gtkWidget GtkSheet instance gtkContainer GtkSheet newSheet :: !Int !Int !String -> GtkM GtkSheet /** * Freezing a sheet means that the GUI will not be updated; all model updates * are collected and the GUI is updated in a single step when the sheet is * unfrozen. This is a wrapper function which freezes the sheet, executes the * monad, and then unfreezes the sheet again. */ whileFrozen :: !(GtkM a) !GtkSheet -> GtkM a /** * Make sure the sheet has the given width and height by adding or deleting * rows and columns. */ ensureDimensions :: !Int !Int !GtkSheet -> GtkM GtkSheet setColumnTitle :: !Int !String !GtkSheet -> GtkM GtkSheet setColumnTitles :: ![String] !GtkSheet -> GtkM GtkSheet setRowTitle :: !Int !String !GtkSheet -> GtkM GtkSheet setRowTitles :: ![String] !GtkSheet -> GtkM GtkSheet setCellText :: !Int !Int !String !GtkSheet -> GtkM GtkSheet getCellText :: !Int !Int !GtkSheet -> GtkM (Maybe String) setColumnJustification :: !GtkJustification !Int !GtkSheet -> GtkM GtkSheet setCSSClassForRange :: !GtkCSSClass !(!Int,!Int) !(!Int,!Int) !GtkSheet -> GtkM GtkSheet setRangeEditable :: !Bool !(!Int,!Int) !(!Int,!Int) !GtkSheet -> GtkM GtkSheet setRowVisibility :: !Bool !Int !GtkSheet -> GtkM GtkSheet isRowVisible :: !Int !GtkSheet -> GtkM Bool getActiveCell :: !GtkSheet -> GtkM (Maybe (Int,Int)) setActiveCell :: !Int !Int !GtkSheet -> GtkM GtkSheet scrollToCell :: !GtkSheetScrollMode !Int !Int !GtkSheet -> GtkM GtkSheet getEntry :: !GtkSheet -> GtkM GtkEntry :: GtkSheetColumnResizability = ColumnsResizable | ColumnsFixedSize :: GtkSheetColumnSensitity = ColumnsSensitive | ColumnsInsensitive :: GtkSheetRowResizability = RowsResizable | RowsFixedSize :: GtkSheetRowSensitity = RowsSensitive | RowsInsensitive :: GtkSheetScrollMode = CellInTopLeft | CellInTopRight | CellInBottomLeft | CellInBottomRight instance tune GtkSheet GtkSheetColumnResizability, GtkSheet GtkSheetColumnSensitity, GtkSheet GtkSheetRowResizability, GtkSheet GtkSheetRowSensitity