tests/TreeBuilder.vala
[app.Builder.js] / Builder4 / GtkView.bjs
1 {
2     "name" : "GtkView",
3     "parent" : "",
4     "title" : "",
5     "path" : "/home/alan/gitlive/app.Builder.js/Builder4/GtkView.bjs",
6     "permname" : "",
7     "modOrder" : "",
8     "items" : [
9         {
10             "id" : "GtkView",
11             "| void createThumb" : "() {\n    \n    \n    if (this.file == null) {\n        return;\n    }\n    var filename = this.file.getIconFileName(false);\n    \n    var  win = this.el.get_parent_window();\n    var width = win.get_width();\n    var height = win.get_height();\n\n    Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?\n\n    screenshot.save(filename,\"png\");\n    return;\n    \n    \n    \n    \n    \n     \n    \n    // should we hold until it's printed...\n    \n      \n\n    \n    \n\n\n    \n     \n}\n",
12             "# Gtk.Widget lastObj" : "null",
13             "| void loadFile" : "(JsRender.JsRender file) \n{\n    \n        this.el.set_position((int)(this.el.max_position * 0.7));\n        this.file = null;\n        \n        if (file.tree == null) {\n            return;\n        }\n        this.file = file;\n        if (this.lastObj != null) {\n            this.container.el.remove(this.lastObj);\n        }\n \n\tvar x = new JsRender.NodeToGtk(file.tree);\n        var obj = x.munge() as Gtk.Widget;\n        this.lastObj = null;\n\tif (obj == null) {\n        \treturn;\n\t}\n\tthis.lastObj = obj;\n        \n        this.container.el.add(obj);\n        obj.show_all();\n}\n ",
14             "xtype" : "VPaned",
15             "# JsRender.JsRender file" : "null",
16             "$ xns" : "Gtk",
17             "items" : [
18                 {
19                     "* pack" : "add1",
20                     "xtype" : "Viewport",
21                     "$ xns" : "Gtk",
22                     "items" : [
23                         {
24                             "id" : "container",
25                             "xtype" : "HBox",
26                             "* pack" : "add",
27                             "$ xns" : "Gtk"
28                         }
29                     ]
30                 },
31                 {
32                     "* pack" : "add2",
33                     "xtype" : "ScrolledWindow",
34                     "$ xns" : "Gtk",
35                     "items" : [
36                         {
37                             "* pack" : "add",
38                             "xtype" : "VBox",
39                             "$ xns" : "Gtk",
40                             "items" : [
41                                 {
42                                     "* pack" : "pack_start,false,false,0",
43                                     "xtype" : "HBox",
44                                     "$ xns" : "Gtk",
45                                     "items" : [
46                                         {
47                                             "* pack" : "pack_start,true,true,0",
48                                             "xtype" : "Button",
49                                             "$ xns" : "Gtk",
50                                             "utf8 label" : "Compile"
51                                         }
52                                     ]
53                                 },
54                                 {
55                                     "* pack" : "pack_start,true,true,0",
56                                     "xtype" : "HBox",
57                                     "gboolean homogeneous" : true,
58                                     "$ xns" : "Gtk",
59                                     "items" : [
60                                         {
61                                             "* pack" : "add",
62                                             "xtype" : "TreeView",
63                                             "$ xns" : "Gtk",
64                                             "items" : [
65                                                 {
66                                                     "gint n_columns" : 1,
67                                                     "columns" : "  typeof(string)",
68                                                     "* pack" : "set_model",
69                                                     "xtype" : "ListStore",
70                                                     "$ xns" : "Gtk"
71                                                 },
72                                                 {
73                                                     "utf8 title" : "Compile output",
74                                                     "xtype" : "TreeViewColumn",
75                                                     "string id" : "column",
76                                                     "$ xns" : "Gtk",
77                                                     "items" : [
78                                                         {
79                                                             "* pack" : "pack_start,false",
80                                                             "xtype" : "CellRendererText",
81                                                             "$ xns" : "Gtk"
82                                                         }
83                                                     ]
84                                                 }
85                                             ]
86                                         },
87                                         {
88                                             "* pack" : "pack_start,true,true,0",
89                                             "xtype" : "ScrolledWindow",
90                                             "$ xns" : "Gtk",
91                                             "items" : [
92                                                 {
93                                                     "gboolean show_line_marks" : true,
94                                                     "* pack" : "add",
95                                                     "xtype" : "View",
96                                                     "$ xns" : "GtkSource",
97                                                     "gboolean show_line_numbers" : true,
98                                                     "gboolean editable" : false
99                                                 }
100                                             ]
101                                         }
102                                     ]
103                                 }
104                             ]
105                         }
106                     ]
107                 }
108             ]
109         }
110     ]
111 }