summaryrefslogtreecommitdiff
path: root/src/Gtk/Widgets.icl
diff options
context:
space:
mode:
authorCamil Staps2019-10-22 21:55:49 +0200
committerCamil Staps2019-10-22 21:58:18 +0200
commit4361daded9afcd93addf8222f4b6fa9b42de1c97 (patch)
tree92a7e5535d9b89a27dc331d5cc64fc0171ff8683 /src/Gtk/Widgets.icl
parentAdd custom GtkM state monad with a bind that does not grow the stack (diff)
Add setText for TextBuffer
Diffstat (limited to 'src/Gtk/Widgets.icl')
-rw-r--r--src/Gtk/Widgets.icl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Gtk/Widgets.icl b/src/Gtk/Widgets.icl
index a2f0d00..5be2cea 100644
--- a/src/Gtk/Widgets.icl
+++ b/src/Gtk/Widgets.icl
@@ -175,6 +175,9 @@ newScrolledWindow = toStateR (gtk_scrolled_window_new 0 0) >>= show
insertAtCursor :: !String !GtkTextBuffer -> GtkM ()
insertAtCursor s buffer = toState (gtk_text_buffer_insert_at_cursor buffer s (size s))
+setText :: !String !GtkTextBuffer -> GtkM ()
+setText s buffer = toState (gtk_text_buffer_set_text buffer s (size s))
+
:: GtkTextView :== Pointer
instance gtkWidget GtkTextView where gtkWidget tv = tv