Sample/EditProject.js
[app.Builder.js] / Sample / EditProject.js
1 Gtk = imports.gi.Gtk;
2 Gdk = imports.gi.Gdk;
3 Pango = imports.gi.Pango;
4 GLib = imports.gi.GLib;
5 Gio = imports.gi.Gio;
6 GObject = imports.gi.GObject;
7 GtkSource = imports.gi.GtkSource;
8 WebKit = imports.gi.WebKit;
9 Vte = imports.gi.Vte;
10 console = imports.console;
11 XObject = imports.XObject.XObject;
12 EditProject=new XObject({
13     xtype: Gtk.Dialog,
14     default_height : 300,
15     default_width : 600,
16     items : [
17         {
18             xtype: Gtk.VBox,
19             pack : function(p,e) {
20                                 p.el.get_content_area().add(e.el)
21                             },
22             items : [
23                 {
24                     xtype: Gtk.HBox,
25                     pack : "pack_start,false,true,0",
26                     items : [
27                         {
28                             xtype: Gtk.Label,
29                             pack : "add",
30                             label : "Project Name"
31                         },
32                         {
33                             xtype: Gtk.Entry,
34                             pack : "pack_end,true,true,0",
35                             id : "name"
36                         }
37                     ]
38                 },
39                 {
40                     xtype: Gtk.HBox,
41                     pack : "pack_start,false,true,0",
42                     items : [
43                         {
44                             xtype: Gtk.Label,
45                             pack : "add",
46                             label : "Project type :"
47                         },
48                         {
49                             xtype: Gtk.Entry,
50                             pack : "add"
51                         }
52                     ]
53                 }
54             ]
55         },
56         {
57             xtype: Gtk.Button,
58             pack : "add_action_widget,1",
59             label : "OK"
60         },
61         {
62             xtype: Gtk.Button,
63             pack : "add_action_widget,0",
64             label : "Cancel"
65         }
66     ]
67 });
68 EditProject.init();
69 XObject.cache['/EditProject'] = EditProject;