X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FJsRender%2FNodeProp.vala;h=edb5e176942fffe94b7f434fca82b736a780eb6a;hb=d52bd242863f1e2c264ad7346671e930ab723085;hp=fed051f4359e4164af5cf926657f9dca242a26c8;hpb=d1f80786378c8af67c5edf9a0907b8e4958a2506;p=roobuilder diff --git a/src/JsRender/NodeProp.vala b/src/JsRender/NodeProp.vala index fed051f43..edb5e1769 100644 --- a/src/JsRender/NodeProp.vala +++ b/src/JsRender/NodeProp.vala @@ -86,6 +86,43 @@ public enum JsRender.NodePropType } } + public static NodePropType[] alltypes() + { + return { + PROP, + USER, + RAW, + METHOD, + SIGNAL, + + SPECIAL, + LISTENER + // CTOR, + + }; + } + public static NodePropType nameToType(string str) + { + foreach(var np in alltypes()) { + if (np.to_name() == str) { + return np; + } + } + return NONE; + + } + public static string[] get_pulldown_list() + { + // eventually it needs to be smarter.... - but i did not have internet so could not use listmodels for the dropdown + + string[] ret = {}; + foreach(var np in alltypes()) { + ret += np.to_name(); + } + return ret; + + } + } @@ -94,6 +131,10 @@ public enum JsRender.NodePropType public class JsRender.NodeProp : Object { + + + + private string _name = ""; public string name { get { @@ -217,6 +258,10 @@ public class JsRender.NodeProp : Object { this.childstore = new GLib.ListStore( typeof(NodeProp)); } + public string ptype_as_string { + get { return this.ptype.to_string(); } + private set {} + } public bool equals(NodeProp p) @@ -640,6 +685,7 @@ public class JsRender.NodeProp : Object { this.childstore.append(child); } + /** could use enums.. but basically.