Fix #8089 - phase 1 - code ast navigation
[roobuilder] / src / Builder4 / CodeInfo.bjs
1 {
2  "build_module" : "roobuilder",
3  "gen_extended" : false,
4  "items" : [
5   {
6    "$ xns" : "Gtk",
7    "items" : [
8     {
9      "$ xns" : "Gtk",
10      "* prop" : "child",
11      "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
12      "items" : [
13       {
14        "$ xns" : "Gtk",
15        "* prop" : "end_child",
16        "items" : [
17         {
18          "$ xns" : "Gtk",
19          "items" : [
20           {
21            "$ xns" : "WebKit",
22            "* prop" : "child",
23            "xtype" : "WebView"
24           }
25          ],
26          "string tab_label" : "Documentation",
27          "xtype" : "NotebookPage"
28         }
29        ],
30        "xtype" : "Notebook"
31       },
32       {
33        "$ xns" : "Gtk",
34        "* prop" : "start_child",
35        "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
36        "bool hexpand" : true,
37        "bool vexpand" : true,
38        "int spacing" : 0,
39        "items" : [
40         {
41          "$ xns" : "Gtk",
42          "bool hexpand" : true,
43          "bool search_mode_enabled" : true,
44          "items" : [
45           {
46            "$ xns" : "Gtk",
47            "* prop" : "child",
48            "bool activates_default" : true,
49            "bool hexpand" : true,
50            "xtype" : "SearchEntry"
51           }
52          ],
53          "xtype" : "SearchBar"
54         },
55         {
56          "$ xns" : "Gtk",
57          "bool hexpand" : true,
58          "bool vexpand" : true,
59          "items" : [
60           {
61            "$ xns" : "Gtk",
62            "* prop" : "child",
63            "items" : [
64             {
65              "$ xns" : "Gtk",
66              "bool expand" : true,
67              "items" : [
68               {
69                "$ xns" : "Gtk",
70                "* prop" : "factory",
71                "listeners" : {
72                 "bind" : [
73                  "(listitem) => {",
74                  "\t// GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
75                  "\t",
76                  "\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
77                  "\tvar expand = (Gtk.TreeExpander)  ((Gtk.ListItem)listitem).get_child();",
78                  "\t ",
79                  "\t ",
80                  "\tvar hbox = (Gtk.Box) expand.child;",
81                  " ",
82                  "\t",
83                  "\tvar img = (Gtk.Image) hbox.get_first_child();",
84                  "\tvar lbl = (Gtk.Label) img.get_next_sibling();",
85                  "\t",
86                  "\tvar lr = (Gtk.TreeListRow)((Gtk.ListItem)listitem).get_item();",
87                  "\tvar node = (JsRender.Node) lr.get_item();",
88                  "\tif (node == null || node.fqn() == \"\") {",
89                  "\t\treturn;",
90                  "\t}",
91                  "   ",
92                  "    expand.set_hide_expander( !node.hasChildren() );",
93                  " \texpand.set_list_row(lr);",
94                  " \t",
95                  " \tnode.bind_property(\"iconResourceName\",",
96                  "                    img, \"resource\",",
97                  "                   GLib.BindingFlags.SYNC_CREATE);",
98                  " \t",
99                  " \tnode.bind_property(\"nodeTitleProp\",",
100                  "                    lbl, \"label\",",
101                  "                   GLib.BindingFlags.SYNC_CREATE);",
102                  " \tnode.bind_property(\"nodeTipProp\",",
103                  "                    lbl, \"tooltip_markup\",",
104                  "                   GLib.BindingFlags.SYNC_CREATE);",
105                  " \t// bind image...",
106                  " \t",
107                  "}",
108                  ""
109                 ],
110                 "setup" : [
111                  "(listitem) => {",
112                  "\t",
113                  "\tvar expand = new Gtk.TreeExpander();",
114                  "\t ",
115                  "\texpand.set_indent_for_depth(true);",
116                  "\texpand.set_indent_for_icon(true);",
117                  "\tvar hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL,0);",
118                  "\tvar icon = new Gtk.Image();",
119                  "\tvar lbl = new Gtk.Label(\"\");",
120                  "\tlbl.use_markup = true;",
121                  "\tlbl.ellipsize = Pango.EllipsizeMode.END;",
122                  "\t",
123                  "\ticon.margin_end = 4;",
124                  " \tlbl.justify = Gtk.Justification.LEFT;",
125                  " \tlbl.xalign = 0;",
126                  "",
127                  "//\tlistitem.activatable = true; ??",
128                  "\t",
129                  "\thbox.append(icon);",
130                  "\thbox.append(lbl);",
131                  "\texpand.set_child(hbox);",
132                  "\t((Gtk.ListItem)listitem).set_child(expand);",
133                  "\t",
134                  "}",
135                  ""
136                 ]
137                },
138                "xtype" : "SignalListItemFactory"
139               }
140              ],
141              "string title" : "Object Navigation",
142              "xtype" : "ColumnViewColumn"
143             },
144             {
145              "$ xns" : "Gtk",
146              "* prop" : "model",
147              "items" : [
148               {
149                "$ Gtk.TreeListModelCreateModelFunc create_func" : [
150                 "(item) => {",
151                 "\t//fixme...",
152                 "\treturn ((JsRender.Node)item).childstore;",
153                 "}",
154                 ""
155                ],
156                "$ xns" : "Gtk",
157                "* prop" : "model",
158                "bool autoexpand" : true,
159                "bool passthrough" : false,
160                "items" : [
161                 {
162                  "$ GLib.Type item_type" : "typeof(JsRender.Node)",
163                  "$ xns" : "GLib",
164                  "* prop" : "root",
165                  "xtype" : "ListStore"
166                 }
167                ],
168                "xtype" : "TreeListModel"
169               }
170              ],
171              "xtype" : "SingleSelection"
172             }
173            ],
174            "xtype" : "ColumnView"
175           }
176          ],
177          "xtype" : "ScrolledWindow"
178         }
179        ],
180        "xtype" : "Box"
181       }
182      ],
183      "xtype" : "Paned"
184     }
185    ],
186    "xtype" : "Popover",
187    "| void show" : [
188     "(Gtk.Widget onbtn) {",
189     "   this.el.set_parent(onbtn);",
190     "\tthis.el.popup();",
191     "}"
192    ]
193   }
194  ],
195  "name" : "CodeInfo"
196 }