-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtest.coffee
More file actions
56 lines (43 loc) · 1.21 KB
/
test.coffee
File metadata and controls
56 lines (43 loc) · 1.21 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
console.log 'test.js'
gtk = require './build/default/gtk'
process.nextTick ->
gtk.init()
window = new gtk.Window
hbox = new gtk.Hbox
progress_hbox = new gtk.Hbox
window.add hbox
hbox2 = new gtk.Hbox
hbox3 = new gtk.Hbox
entry = new gtk.Entry
progressbar = new gtk.ProgressBar
hbox.add hbox2
hbox.add hbox3
hbox.add progress_hbox
progress_hbox.add progressbar
progressbar.setFraction 0.45
entry.setText 'A teeheehee!'
entry.setVisibility true
entry.on 'changed', ->
console.log 'changed'
button = new gtk.Button
button.setLabel 'Test Button'
img = new gtk.Image
img.setFromFile './data/ngtk.png'
button.setImage img
button.on 'clicked', ->
console.log 'clicked'
dialog = new gtk.MessageDialog window, gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, 'Node.js + GTK <3'
dialog.show()
hbox2.add button
hbox3.add entry
window.setTitle 'Node'
window.setResizable true
window.setDefaultSize()
window.on 'destroy', ->
console.log window.getOpacity()
console.log window.getPosition()
console.log window.getSize()
console.log window.getResizable true
console.log window.getTitle()
console.log 'OMG'
window.show()