summaryrefslogtreecommitdiff
path: root/test/test.icl
blob: 9d6f7ea726d91ad160fa3d229b327327ae23b23a (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
25
26
27
module test

import StdMaybe

import Control.Applicative
import Control.Monad
import Control.Monad.Identity
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) >>|
		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)