// skip '+' properties?? not sure where they are used.
this.addValaCtor();
- //this.addUnderThis();
- this.addWrappedCtor(); // var this.el = new XXXXX()
-
+
+
this.addInitMyVars();
this.addWrappedProperties();
this.addChildren();
}
+ protected overide void addWrappedProperties()
+ {
+ var cls = Palete.Gir.factoryFqn((Project.Gtk) this.file.project, this.node.fqn());
+ if (cls == null) {
+ GLib.debug("Skipping wrapped properties - could not find class %s" , this.node.fqn());
+ return;
+ }
+ // what are the properties of this class???
+ this.addLine();
+ this.addLine(this.ipad + "// set gobject values (not done in Object()");
+
+
+ var iter = cls.props.map_iterator();
+ while (iter.next()) {
+ var p = iter.get_key();
+ //print("Check Write %s\n", p);
+ if (!this.node.has(p)) {
+ continue;
+ }
+ if (this.shouldIgnoreWrapped(p)) {
+ continue;
+ }
+
+ this.ignore(p);
+
+
+ var prop = this.node.get_prop(p);
+ var v = prop.val;
+
+ // user defined properties.
+ if (prop.ptype == NodePropType.USER) {
+ continue;
+ }
+
+
+
+ var is_raw = prop.ptype == NodePropType.RAW;
+
+ // what's the type.. - if it's a string.. then we quote it..
+ if (iter.get_value().type == "string" && !is_raw) {
+ v = "\"" + v.escape("") + "\"";
+ }
+ if (v == "TRUE" || v == "FALSE") {
+ v = v.down();
+ }
+ if (iter.get_value().type == "float" && v[v.length-1] != 'f') {
+ v += "f";
+ }
+
+ prop.start_line = this.cur_line;
+ this.addLine("%sthis.el.%s = %s;".printf(ipad,p,v)); // // %s, iter.get_value().type);
+ prop.end_line = this.cur_line;
+ // got a property..
+
+
+ }
+
+ }
+
}