summaryrefslogtreecommitdiff
path: root/src/Gtk/Widgets/Sheet.icl
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gtk/Widgets/Sheet.icl')
-rw-r--r--src/Gtk/Widgets/Sheet.icl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Gtk/Widgets/Sheet.icl b/src/Gtk/Widgets/Sheet.icl
index c28816f..a1a8c1f 100644
--- a/src/Gtk/Widgets/Sheet.icl
+++ b/src/Gtk/Widgets/Sheet.icl
@@ -102,6 +102,17 @@ setActiveCell row col sheet=:(GtkSheet s) =
toState (gtk_sheet_set_active_cell s row col) >>|
pure sheet
+scrollToCell :: !GtkSheetScrollMode !Int !Int !GtkSheet -> GtkM GtkSheet
+scrollToCell scroll_mode row col sheet=:(GtkSheet s) =
+ toState (gtk_sheet_moveto s row col row_align col_align) >>|
+ pure sheet
+where
+ (row_align,col_align) = case scroll_mode of
+ CellInTopLeft -> (0,0)
+ CellInTopRight -> (0,1)
+ CellInBottomLeft -> (1,0)
+ CellInBottomRight -> (1,1)
+
getEntry :: !GtkSheet -> GtkM GtkEntry
getEntry (GtkSheet s) =
toStateR (gtk_sheet_get_entry s) >>= \e ->