summaryrefslogtreecommitdiff
path: root/test/test.icl
blob: 635f8ff970dfd0fd171d13896bdc69e5def7a0e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module test

import StdMaybe

import Control.Applicative
import Control.Monad
import Control.Monad.Identity
import Control.Monad.State

import Gtk

Start w = runGtk app w
where
	app =
		newWindow "Hello!" Nothing >>= \window ->
		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)