public class JsRender.NodeToValaWrapped : NodeToVala {
-
-
+
public NodeToValaWrapped( JsRender file, Node node, int depth, NodeToVala? parent)
{
base (file, node, depth, parent);
public override string munge ( )
{
//return this.mungeToString(this.node);
-
-
+ if (this.node.as_source_version > 0 &&
+ this.node.as_source_version == this.node.updated_count &&
+ this.node.as_source_start_line == cur_line &&
+ this.node.as_source != ""
+ ) {
+ return this.node.as_source;
+ }
+ this.node.as_source_start_line = cur_line;
this.namespaceHeader();
this.globalVars();
this.iterChildren();
this.namespaceFooter();
+
+ this.node.as_source_version = this.node.updated_count;
+ this.node.as_source == this.ret;
return this.ret;
//for (var ari =0; ari < ar.length; ari++) {
// cargs += (ar[ari].trim().split(" ").pop();
// }
- }
+ }
+
if (this.depth < 1) {
var top = this.top as NodeToVala;
var tcls = top == null ? "???" : top.xcls;
// for sub classes = we passs the top level as _owner
+ if (this.node.fqn() == "Gtk.NotebookPage") {
+ cargs_str += ", " + this.node.parent.xvala_xcls + " notebook";
+ }
+
this.addLine(this.pad + "public " + this.xcls + "(" + tcls + " _owner " + cargs_str + ")");
this.addLine(this.pad + "{");
}
this.node.setLine(this.cur_line, "p", "* xtype");;
- // is the wrapped element a struct?
-
+
+ // Notebookpage is a fake element
+ // used to hold label and child...
+
+ // is the wrapped element a struct?
var ncls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
if (ncls != null && ncls.nodetype == "Struct") {
// we can use regular setters to apply the values.
var args_str = "";
switch(this.node.fqn()) {
+
+ // GTK4
+ case "Gtk.NotebookPage":
+ return;
+
+
+
+
// FIXME -- these are all GTK3 - can be removed when I get rid of them..
case "Gtk.ComboBox":
var is_entry = this.node.has("has_entry") && this.node.get_prop("has_entry").val.down() == "true";