change run to use meson/ninja and then exec. - remove libvala code from application...
[roobuilder] / src / Builder4 / ValaCompileResults.bjs
1 {
2  "build_module" : "builder",
3  "gen_extended" : false,
4  "items" : [
5   {
6    "$ xns" : "Gtk",
7    "Gtk.PositionType position" : "Gtk.PositionType.TOP",
8    "Xcls_MainWindow window" : "",
9    "bool active" : true,
10    "bool modal" : true,
11    "id" : "ValaCompileResults",
12    "int height_request" : 400,
13    "int width_request" : 600,
14    "items" : [
15     {
16      "$ xns" : "Gtk",
17      "* pack" : "set_child",
18      "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
19      "bool hexpand" : true,
20      "bool vexpand" : true,
21      "gboolean homogeneous" : false,
22      "id" : "compile_view",
23      "items" : [
24       {
25        "$ xns" : "Gtk",
26        "* init" : [
27         "{",
28         " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
29         " ",
30         "",
31         "}",
32         ""
33        ],
34        "bool hexpand" : true,
35        "bool vexpand" : true,
36        "items" : [
37         {
38          "$ xns" : "GtkSource",
39          "* init" : [
40           "{",
41           "",
42           "   \tthis.css = new Gtk.CssProvider();",
43           "\t ",
44           "\tthis.css.load_from_string(",
45           "\t\t\"#compile-results-view { font: 10px monospace ;}\"",
46           "\t);",
47           "\t ",
48           "\t\t\tGtk.StyleContext.add_provider_for_display(",
49           "\t\tthis.el.get_display(),",
50           "\t\tthis.css,",
51           "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
52           "\t);",
53           "\t\t",
54           "",
55           "}",
56           ""
57          ],
58          "* prop" : "child",
59          "Gtk.CssProvider css" : "",
60          "bool editable" : false,
61          "bool hexpand" : true,
62          "bool show_line_numbers" : false,
63          "bool vexpand" : true,
64          "id" : "sourceview",
65          "string name" : "compile-results-view",
66          "xtype" : "View"
67         }
68        ],
69        "xtype" : "ScrolledWindow"
70       }
71      ],
72      "xtype" : "Box"
73     }
74    ],
75    "xtype" : "Popover",
76    "| void addLine" : [
77     "(string str) {",
78     "\t ",
79     "\t",
80     "\t",
81     "\tvar buf = (GtkSource.Buffer)this.sourceview.el.get_buffer();",
82     "\tGtk.TextIter iter;",
83     "\tbuf.get_end_iter (out  iter);",
84     "\tbuf.insert(ref iter, str, str.length);",
85     "\t/// scroll..",
86     "\tbuf.get_end_iter (out  iter);",
87     "\tthis.sourceview.el.scroll_to_iter(iter, 0.0f, true, 0.0f, 1.0f);",
88     " ",
89     "}",
90     ""
91    ],
92    "| void show" : [
93     "( Gtk.Widget onbtn, bool reset) {",
94     "\tvar win = this.window.el;",
95     "    var  w = win.get_width();",
96     "    var h = win.get_height();",
97     "",
98     "    // left tree = 250, editor area = 500?",
99     "    ",
100     "    var new_w = int.min(750, w-100);",
101     "    if (new_w > (w-100)) {",
102     "        new_w = w-100;",
103     "    }",
104     "    this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));",
105     " \tif (this.el.parent == null) {",
106     "\t\tthis.el.set_parent(win);",
107     "\t}",
108     "   // Gtk.Allocation rect;",
109     "\t//onbtn.get_allocation(out rect);",
110     "    //this.el.set_pointing_to(rect);",
111     "",
112     "    this.el.popup();",
113     "   // not sure why..",
114     "   ",
115     "   if (reset) {",
116     "\t\tvar buf = (GtkSource.Buffer)this.sourceview.el.get_buffer();",
117     "\t\tbuf.set_text(\"\",0);",
118     "\t}",
119     "   ",
120     "    ",
121     "    ",
122     "    ",
123     "}",
124     ""
125    ]
126   }
127  ],
128  "name" : "ValaCompileResults"
129 }