Fix #8025 - move css to resources
[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          "* prop" : "child",
40          "bool editable" : false,
41          "bool hexpand" : true,
42          "bool show_line_numbers" : false,
43          "bool vexpand" : true,
44          "id" : "sourceview",
45          "string name" : "compile-results-view",
46          "xtype" : "View"
47         }
48        ],
49        "xtype" : "ScrolledWindow"
50       }
51      ],
52      "xtype" : "Box"
53     }
54    ],
55    "xtype" : "Popover",
56    "| void addLine" : [
57     "(string str) {",
58     "\t ",
59     "\t",
60     "\t",
61     "\tvar buf = (GtkSource.Buffer)this.sourceview.el.get_buffer();",
62     "\tGtk.TextIter iter;",
63     "\tbuf.get_end_iter (out  iter);",
64     "\tbuf.insert(ref iter, str, str.length);",
65     "\t/// scroll..",
66     "\tbuf.get_end_iter (out  iter);",
67     "\tthis.sourceview.el.scroll_to_iter(iter, 0.0f, true, 0.0f, 1.0f);",
68     " ",
69     "}",
70     ""
71    ],
72    "| void show" : [
73     "( Gtk.Widget onbtn, bool reset) {",
74     "\tvar win = this.window.el;",
75     "    var  w = win.get_width();",
76     "    var h = win.get_height();",
77     "",
78     "    // left tree = 250, editor area = 500?",
79     "    ",
80     "    var new_w = int.min(750, w-100);",
81     "    if (new_w > (w-100)) {",
82     "        new_w = w-100;",
83     "    }",
84     "    this.el.set_size_request( int.max(100, new_w), int.max(100, h-120));",
85     " \tif (this.el.parent == null) {",
86     "\t\tthis.el.set_parent(win);",
87     "\t}",
88     "   // Gtk.Allocation rect;",
89     "\t//onbtn.get_allocation(out rect);",
90     "    //this.el.set_pointing_to(rect);",
91     "",
92     "    this.el.popup();",
93     "   // not sure why..",
94     "   ",
95     "   if (reset) {",
96     "\t\tvar buf = (GtkSource.Buffer)this.sourceview.el.get_buffer();",
97     "\t\tbuf.set_text(\"\",0);",
98     "\t}",
99     "   ",
100     "    ",
101     "    ",
102     "    ",
103     "}",
104     ""
105    ]
106   }
107  ],
108  "name" : "ValaCompileResults"
109 }