summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCamil Staps2019-10-20 10:02:46 +0200
committerCamil Staps2019-10-20 10:02:46 +0200
commitc0b119e20d4874bd330c9cd9d352fd2666f19191 (patch)
treeb4122ed9e831a2f6916626a61dd60f6dae9570c4 /test
parentInitial commit (diff)
Add rudimentary support for GtkPaned and GtkTextView
Diffstat (limited to 'test')
-rw-r--r--test/test.icl11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/test.icl b/test/test.icl
index 5717add..9d6f7ea 100644
--- a/test/test.icl
+++ b/test/test.icl
@@ -9,10 +9,19 @@ import Control.Monad.State
import Gtk.Signal
import Gtk.State
+import Gtk.Types
import Gtk.Widgets
Start w = runGtk app w
where
app =
newWindow "Hello!" Nothing >>= \window ->
- installSignalHandler window (DestroyHandler quit)
+ installSignalHandler window (DestroyHandler quit) >>|
+ newPaned Horizontal WideHandle >>= \paned ->
+ addToContainer paned window >>|
+ newTextView >>= \text_view_a ->
+ newTextView >>= \text_view_b ->
+ packPane1 text_view_a paned Resize Shrink >>|
+ packPane2 text_view_b paned Resize Shrink >>|
+ insertAtCursor "Hello" (getTextBuffer text_view_a) >>|
+ insertAtCursor "world!" (getTextBuffer text_view_b)