Gtk.HSV
Gtk.FileChooserButton
Gtk.FileChooserWidget
- Gtk.FontButton
+ Gtk.FontButton
+ Gtk.IconView
GtkSource.View
WebKit.WebView
Gtk.Viewport
left:
Gtk.CellRendererCombo:model
Gtk.ComboBox
+ Gtk.IconView:model
right:
Gtk.ListStore
{
- "name" : "About",
- "parent" : "",
- "title" : "",
- "path" : "/home/alan/gitlive/roobuilder/src/Builder4/About.bjs",
- "permname" : "",
- "modOrder" : "",
"build_module" : "builder",
"items" : [
{
+ "$ authors" : "{ \"Alan Knowles\" }",
+ "$ modal" : true,
+ "$ xns" : "Gtk",
"listeners" : {
- "response" : "(rid) => {\n this.el.hide();\n \n}\n "
+ "response" : [
+ "(rid) => {",
+ " this.el.hide();",
+ " ",
+ "}",
+ " "
+ ]
},
- "| void show" : "(Gtk.Window parent) {\n this.el.set_transient_for(parent);\n this.el.modal = true;\n this.el.show();\n}\n ",
"program_name" : "roobuilder",
- "xtype" : "AboutDialog",
- "$ modal" : true,
- "$ authors" : "{ \"Alan Knowles\" }",
- "$ xns" : "Gtk",
- "website" : "https://github.com/roojs/roobuilder",
"string copyright" : "LGPL",
- "string license" : "LGPL"
+ "string license" : "LGPL",
+ "string version" : 2.1000000000000001,
+ "website" : "https://github.com/roojs/roobuilder",
+ "xtype" : "AboutDialog",
+ "| void show" : [
+ "(Gtk.Window parent) {",
+ " this.el.set_transient_for(parent);",
+ " this.el.modal = true;",
+ " this.el.show();",
+ "}",
+ " "
+ ]
}
- ]
+ ],
+ "modOrder" : "",
+ "name" : "About",
+ "parent" : "",
+ "path" : "/home/alan/gitlive/roobuilder/src/Builder4/About.bjs",
+ "permname" : "",
+ "title" : ""
}
\ No newline at end of file
this.el.program_name = "roobuilder";
this.el.license = "LGPL";
this.el.authors = { "Alan Knowles" };
+ this.el.version = "2.1";
this.el.website = "https://github.com/roojs/roobuilder";
this.el.modal = true;
this.el.copyright = "LGPL";
{
- "name" : "ClutterFiles",
- "parent" : "",
- "title" : "",
- "path" : "/home/alan/gitlive/roobuilder/src/Builder4/ClutterFiles.bjs",
- "permname" : "",
- "modOrder" : "",
"build_module" : "builder",
"items" : [
{
- "id" : "ClutterFiles",
- "| void clearFiles" : "() {\n \n this.filelayout.el.remove_all_children();\n // we need to unref all the chidren that we loaded though...\n \n}\n ",
- "Clutter.ScrollMode scroll_mode" : "Clutter.ScrollMode.VERTICALLY",
- "xtype" : "Actor",
- "| void loadProject" : "(Project.Project pr) {\n // list all the files, and create new Xcls_fileitem for each one.\n \n this.project = pr;\n \n \n // LEAK --- we should unref all the chilren...\n this.filelayout.el.y = 0;\n this.clearFiles();\n \n print(\"clutter files - load project: \" + pr.name +\"\\n\");\n // should unref.. them hopefully.\n \n this.project_title_name.el.text = pr.name;\n this.project_title_path.el.text = pr.firstPath();\n \n // file items contains a reference until we reload ...\n this.fileitems = new Gee.ArrayList<Object>();\n\n \n\n var fiter = pr.sortedFiles().list_iterator();\n while (fiter.next()) {\n var a = new Xcls_fileitem(this,fiter.get());\n this.fileitems.add(a);\n\n// a.ref();\n print(\"add to clutter file view: \" + fiter.get().name + \"\\n\");\n this.filelayout.el.add_child(a.el);\n }\n \n // folders...\n \n if (!(pr is Project.Gtk)) {\n print (\"not gtk... skipping files\");\n return;\n }\n var gpr = (Project.Gtk)pr;\n var def = gpr.compilegroups.get(\"_default_\");\n // not sure why the above is returng null!??\n if (def == null) {\n \t\tdef = new Project.GtkValaSettings(\"_default_\"); \n \t\tgpr.compilegroups.set(\"_default_\", def);\n }\n\t var items = def.sources;\n\t\t \n\t\t \n\t \n\tfor(var i =0 ; i < items.size; i++) {\n\t print (\"cheking folder %s\\n\", items.get(i));\n\t var files = gpr.filesForOpen(items.get(i));\n\t if (files.size < 1) {\n\t continue;\n\t }\n\n\t // add the directory... items.get(i);\n\t var x = new Xcls_folderitem(this,items.get(i));\n\t this.fileitems.add(x);\n\t this.filelayout.el.add_child(x.el);\n\t \n\t for(var j =0 ; j < files.size; j++) {\n\t print (\"adding file %s\\n\", files.get(j));\n\t \n\t var y = new Xcls_folderfile(this, files.get(j));\n\t this.fileitems.add(y);\n\t x.el.add_child(y.el);\n\n\t // add file to files.get(j);\n\t \n\t }\n\t \n\t \n\t //this.el.set_value(citer, 1, items.get(i) );\n\t}\n \n \n \n this.el.show();\n}\n",
"# Gdk.Pixbuf missing_thumb_pixbuf" : "null",
- "@ void open" : "(JsRender.JsRender file)",
+ "# Gee.ArrayList<Object> fileitems" : "new Gee.ArrayList<Object>()",
"$ xns" : "Clutter",
- "bool reactive" : true,
+ "@ void open" : "(JsRender.JsRender file)",
+ "Clutter.ScrollMode scroll_mode" : "Clutter.ScrollMode.VERTICALLY",
"Project.Project project" : "",
- "| void set_size" : "(float w, float h) \n{\n \n // called by window resize... with is alreaddy -50 (for the buttons?)\n \n\n\n\n if (this.el == null) {\n print(\"object not ready yet?\");\n return;\n }\n \n print(\"recv width %f, filelayoutw = %f\", w, w-200);\n \n w = GLib.Math.floorf ( w/120.0f) * 120.0f;\n \n \n \n \n //_this.filelayout_manager.el.max_column_width = w - 200;\n _this.filelayout.el.width = w ;\n \n this.el.set_size(\n // this.el.get_stage().width-150,\n w,\n h // this.el.get_stage().height\n );\n \n // 100 right for buttons ..\n this.el.set_position(75,0);\n \n \n this.scroller.el.set_size(\n // this.el.get_stage().width-150,\n w,\n h // this.el.get_stage().height\n );\n \n // 100 right for buttons ..\n this.scroller.el.set_position(0,50);\n // scroll...\n _this.filelayout.el.y = 0.0f;\n \n}\n",
- "# Gee.ArrayList<Object> fileitems" : "new Gee.ArrayList<Object>()",
+ "bool reactive" : true,
+ "id" : "ClutterFiles",
"items" : [
{
- "id" : "project_title",
- "* init" : "\nthis.el.add_constraint(\n new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)\n);\nthis.el.set_position(0,0);\n ",
- "xtype" : "Actor",
- "* pack" : "add_child",
"$ reactive" : true,
"$ xns" : "Clutter",
+ "* init" : [
+ "",
+ "this.el.add_constraint(",
+ " new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)",
+ ");",
+ "this.el.set_position(0,0);",
+ " "
+ ],
+ "* pack" : "add_child",
+ "id" : "project_title",
"items" : [
{
- "id" : "project_title_manager",
"$ orientation" : "Clutter.FlowOrientation.HORIZONTAL",
- "xtype" : "FlowLayout",
- "boolean homogeneous" : false,
"$ xns" : "Clutter",
- "row_spacing" : 5,
"* prop" : "layout_manager",
- "column_spacing" : 20
+ "boolean homogeneous" : false,
+ "column_spacing" : 20,
+ "id" : "project_title_manager",
+ "row_spacing" : 5,
+ "xtype" : "FlowLayout"
},
{
- "xtype" : "FixedLayout",
"$ xns" : "Clutter",
- "* prop" : "layout_manager"
+ "* prop" : "layout_manager",
+ "xtype" : "FixedLayout"
},
{
+ "$ xns" : "Clutter",
"* ctor" : "new Clutter.Text.full(\"Sans 20px\", \"\", Clutter.Color.from_string(\"#eee\"))",
- "id" : "project_title_name",
- "float x" : "0.0f",
"* pack" : "add_child",
- "xtype" : "Text",
- "float y" : "10.0f",
"boolean x_expand" : false,
- "$ xns" : "Clutter"
+ "float x" : "0.0f",
+ "float y" : "10.0f",
+ "id" : "project_title_name",
+ "xtype" : "Text"
},
{
+ "$ xns" : "Clutter",
"* ctor" : "new Clutter.Text.full(\"Sans 10px\", \"\", Clutter.Color.from_string(\"#ccc\"))",
- "id" : "project_title_path",
- "float x" : "0.0f",
"* pack" : "add_child",
- "xtype" : "Text",
+ "float x" : "0.0f",
"float y" : "35.0f",
- "$ xns" : "Clutter"
+ "id" : "project_title_path",
+ "xtype" : "Text"
}
- ]
+ ],
+ "xtype" : "Actor"
},
{
- "listeners" : {
- "scroll_event" : "( event) => {\n print(\"scroll event\\n\");\n var y = _this.filelayout.el.y;\n var dir = event.direction;\n \n var last_child_bottom = _this.filelayout.el.last_child.y + _this.filelayout.el.last_child.height;\n var bottompos = -1 * ( last_child_bottom - (0.5f * this.el.height));\n \n switch (dir) {\n case Clutter.ScrollDirection.UP:\n print(\"Scroll up by %f\\n\", event.y);\n y += event.y /2;\n y = float.min(0, y); // \n break;\n \n case Clutter.ScrollDirection.DOWN:\n print(\"Scroll down by %f\\n\", event.y);\n y -= event.y /2 ;\n y = float.max(bottompos, y);\n \n \n break;\n \t case Clutter.ScrollDirection.SMOOTH:\n \t double delta_x, delta_y;\n \t event.get_scroll_delta(out delta_x, out delta_y);\n //print(\"Scroll SMOOTH? by %f\\n\", delta_y * event.y);\n y += ((float)delta_y * event.y * -1.0f) /2 ;\n y = float.max(bottompos, y);\n y = float.min(0, y); // \n \n break;\n default:\n\t print(\"scroll event = bad direction %s\\n\", dir.to_string());\n return false;\n }\n // range of scroll -- can go up -- eg.. -ve value.\n \n\n \n print(\"Set scroll to %f (lcb=%f / height = %f)\\n\", y, last_child_bottom, this.el.height);\n \n _this.filelayout.el.y = y;\n return true;\n \n}"
- },
- "# Gee.ArrayList<Xcls_fileitem> fileitems" : "new Gee.ArrayList<Xcls_fileitem>()",
- "id" : "scroller",
- "Clutter.ScrollMode scroll_mode" : "Clutter.ScrollMode.VERTICALLY",
- "xtype" : "ScrollActor",
- "* pack" : "add_child",
"# Gdk.Pixbuf missing_thumb_pixbuf" : "null",
+ "# Gee.ArrayList<Xcls_fileitem> fileitems" : "new Gee.ArrayList<Xcls_fileitem>()",
"$ xns" : "Clutter",
+ "* pack" : "add_child",
+ "Clutter.ScrollMode scroll_mode" : "Clutter.ScrollMode.VERTICALLY",
"bool reactive" : true,
+ "id" : "scroller",
"items" : [
{
- "id" : "filelayout",
- "* init" : "\nthis.el.add_constraint(\n new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)\n);\n\n ",
- "xtype" : "Actor",
- "* pack" : "add_child",
"$ reactive" : true,
"$ xns" : "Clutter",
+ "* init" : [
+ "",
+ "this.el.add_constraint(",
+ " new Clutter.BindConstraint(_this.el,Clutter.BindCoordinate.SIZE, 0.0f)",
+ ");",
+ "",
+ " "
+ ],
+ "* pack" : "add_child",
+ "id" : "filelayout",
"items" : [
{
- "id" : "filelayout_manager",
- "bool homogeneous" : false,
"$ orientation" : "Clutter.FlowOrientation.HORIZONTAL",
- "xtype" : "FlowLayout",
- "float max_column_width" : "100.0f",
"$ xns" : "Clutter",
- "row_spacing" : 20,
"* prop" : "layout_manager",
- "column_spacing" : 20
+ "bool homogeneous" : false,
+ "column_spacing" : 20,
+ "float max_column_width" : "100.0f",
+ "id" : "filelayout_manager",
+ "row_spacing" : 20,
+ "xtype" : "FlowLayout"
},
{
- "listeners" : {
- "button_press_event" : " ( event) => {\n _this.open(this.file);\n return false;\n} ",
- "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#333\");\n this.title.el.background_color = Clutter.Color.from_string(\"#fff\");\n this.typetitle.el.background_color = Clutter.Color.from_string(\"#fff\");\n this.title.el.color = Clutter.Color.from_string(\"#000\");\n this.typetitle.el.color = Clutter.Color.from_string(\"#000\");\n \n return false;\n}",
- "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n this.title.el.background_color = Clutter.Color.from_string(\"#000\");\n this.typetitle.el.background_color = Clutter.Color.from_string(\"#000\");\n this.title.el.color = Clutter.Color.from_string(\"#fff\");\n this.typetitle.el.color = Clutter.Color.from_string(\"#fff\");\n \n \n return false;\n}"
- },
- "id" : "*fileitem",
- "* args" : "JsRender.JsRender file",
- "* init" : "this.file = file;\nthis.el.set_size(100,100);",
- "* pack" : true,
- "xtype" : "Actor",
"# JsRender.JsRender file" : "",
"$ reactive" : true,
"$ xns" : "Clutter",
+ "* args" : "JsRender.JsRender file",
+ "* init" : [
+ "this.file = file;",
+ "this.el.set_size(100,100);"
+ ],
+ "* pack" : true,
+ "id" : "*fileitem",
"items" : [
{
- "spacing" : 4,
- "xtype" : "BoxLayout",
- "orientation" : "Clutter.Orientation.VERTICAL",
"$ xns" : "Clutter",
- "* prop" : "layout_manager"
+ "* prop" : "layout_manager",
+ "orientation" : "Clutter.Orientation.VERTICAL",
+ "spacing" : 4,
+ "xtype" : "BoxLayout"
},
{
+ "$ margin_left" : 5,
"$ margin_right" : 5,
"$ margin_top" : 5,
- "id" : "+image",
+ "$ x_align" : "Clutter.ActorAlign.START",
+ "$ xns" : "Clutter",
+ "$ y_align" : "Clutter.ActorAlign.START",
"* args" : "JsRender.JsRender file",
- "* init" : "{\n Gdk.Pixbuf pixbuf= null;\n \n var fname = file.getIconFileName(false);\n\n try {\n if (FileUtils.test(fname, FileTest.EXISTS)) {\n pixbuf = new Gdk.Pixbuf.from_file(fname);\n } \n } catch (Error e) {\n // noop\n \n }\n if (pixbuf == null) {\n \n try {\n if (_this.missing_thumb_pixbuf == null) {\n var icon_theme = Gtk.IconTheme.get_default ();\n _this.missing_thumb_pixbuf = icon_theme.load_icon (\"package-x-generic\", 92, 0);\n _this.missing_thumb_pixbuf.ref();\n }\n pixbuf = _this.missing_thumb_pixbuf;\n\n } catch (Error e) {\n // noop?\n }\n }\n try {\n var img = new Clutter.Image();\n img.set_data(pixbuf.get_pixels(), \n pixbuf.has_alpha \n ? Cogl.PixelFormat.RGBA_8888\n : Cogl.PixelFormat.RGB_888,\n pixbuf.get_width (),\n pixbuf.get_height (),\n pixbuf.get_rowstride ()\n );\n this.el.set_content(img);\n } catch (Error e) {\n // noop?\n }\n // should probably do smarter scaling...\n \n \n this.el.set_size(90, 70);\n}\n",
+ "* init" : [
+ "{",
+ " Gdk.Pixbuf pixbuf= null;",
+ " ",
+ " var fname = file.getIconFileName(false);",
+ "",
+ " try {",
+ " if (FileUtils.test(fname, FileTest.EXISTS)) {",
+ " pixbuf = new Gdk.Pixbuf.from_file(fname);",
+ " } ",
+ " } catch (Error e) {",
+ " // noop",
+ " ",
+ " }",
+ " if (pixbuf == null) {",
+ " ",
+ " try {",
+ " if (_this.missing_thumb_pixbuf == null) {",
+ " var icon_theme = Gtk.IconTheme.get_default ();",
+ " _this.missing_thumb_pixbuf = icon_theme.load_icon (\"package-x-generic\", 92, 0);",
+ " _this.missing_thumb_pixbuf.ref();",
+ " }",
+ " pixbuf = _this.missing_thumb_pixbuf;",
+ "",
+ " } catch (Error e) {",
+ " // noop?",
+ " }",
+ " }",
+ " try {",
+ " var img = new Clutter.Image();",
+ " img.set_data(pixbuf.get_pixels(), ",
+ " pixbuf.has_alpha ",
+ " ? Cogl.PixelFormat.RGBA_8888",
+ " : Cogl.PixelFormat.RGB_888,",
+ " pixbuf.get_width (),",
+ " pixbuf.get_height (),",
+ " pixbuf.get_rowstride ()",
+ " );",
+ " this.el.set_content(img);",
+ " } catch (Error e) {",
+ " // noop?",
+ " }",
+ " // should probably do smarter scaling...",
+ " ",
+ " ",
+ " this.el.set_size(90, 70);",
+ "}",
+ ""
+ ],
"* pack" : "add_child",
- "xtype" : "Actor",
"bool x_expand" : false,
- "$ y_align" : "Clutter.ActorAlign.START",
- "$ margin_left" : 5,
- "$ xns" : "Clutter",
"bool y_expand" : false,
- "$ x_align" : "Clutter.ActorAlign.START"
+ "id" : "+image",
+ "xtype" : "Actor"
},
{
- "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickType(), Clutter.Color.from_string(\"#fff\"))",
+ "$ x_align" : "Clutter.ActorAlign.START",
+ "$ xns" : "Clutter",
+ "$ y_align" : "Clutter.ActorAlign.START",
"* args" : "JsRender.JsRender file",
- "id" : "+typetitle",
+ "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickType(), Clutter.Color.from_string(\"#fff\"))",
"* pack" : "add_child",
- "xtype" : "Text",
"bool x_expand" : false,
- "$ y_align" : "Clutter.ActorAlign.START",
- "$ xns" : "Clutter",
"bool y_expand" : false,
- "$ x_align" : "Clutter.ActorAlign.START"
+ "id" : "+typetitle",
+ "xtype" : "Text"
},
{
- "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickNameSplit(), Clutter.Color.from_string(\"#fff\"))",
+ "$ x_align" : "Clutter.ActorAlign.START",
+ "$ xns" : "Clutter",
+ "$ y_align" : "Clutter.ActorAlign.START",
"* args" : "JsRender.JsRender file",
- "id" : "+title",
+ "* ctor" : "new Clutter.Text.full(\"Sans 10px\", file.nickNameSplit(), Clutter.Color.from_string(\"#fff\"))",
"* pack" : "add_child",
- "xtype" : "Text",
"bool x_expand" : false,
- "$ y_align" : "Clutter.ActorAlign.START",
- "$ xns" : "Clutter",
"bool y_expand" : false,
- "$ x_align" : "Clutter.ActorAlign.START"
+ "id" : "+title",
+ "xtype" : "Text"
}
- ]
+ ],
+ "listeners" : {
+ "button_press_event" : [
+ " ( event) => {",
+ " _this.open(this.file);",
+ " return false;",
+ "} "
+ ],
+ "enter_event" : [
+ "( event) => {",
+ " this.el.background_color = Clutter.Color.from_string(\"#333\");",
+ " this.title.el.background_color = Clutter.Color.from_string(\"#fff\");",
+ " this.typetitle.el.background_color = Clutter.Color.from_string(\"#fff\");",
+ " this.title.el.color = Clutter.Color.from_string(\"#000\");",
+ " this.typetitle.el.color = Clutter.Color.from_string(\"#000\");",
+ " ",
+ " return false;",
+ "}"
+ ],
+ "leave_event" : [
+ "( event) => {",
+ " this.el.background_color = Clutter.Color.from_string(\"#000\");",
+ " this.title.el.background_color = Clutter.Color.from_string(\"#000\");",
+ " this.typetitle.el.background_color = Clutter.Color.from_string(\"#000\");",
+ " this.title.el.color = Clutter.Color.from_string(\"#fff\");",
+ " this.typetitle.el.color = Clutter.Color.from_string(\"#fff\");",
+ " ",
+ " ",
+ " return false;",
+ "}"
+ ]
+ },
+ "xtype" : "Actor"
},
{
- "id" : "*folderitem",
- "* args" : "string folderpath",
- "* init" : " \n//this.el.set_size(100,100);",
- "* pack" : true,
- "xtype" : "Actor",
"$ reactive" : true,
"$ xns" : "Clutter",
+ "* args" : "string folderpath",
+ "* init" : [
+ " ",
+ "//this.el.set_size(100,100);"
+ ],
+ "* pack" : true,
+ "id" : "*folderitem",
"items" : [
{
- "spacing" : 2,
- "xtype" : "BoxLayout",
- "orientation" : "Clutter.Orientation.VERTICAL",
"$ xns" : "Clutter",
- "* prop" : "layout_manager"
+ "* prop" : "layout_manager",
+ "orientation" : "Clutter.Orientation.VERTICAL",
+ "spacing" : 2,
+ "xtype" : "BoxLayout"
},
{
- "* ctor" : "new Clutter.Text.full(\"Sans bold 14px\", GLib.Path.get_basename(folderpath), Clutter.Color.from_string(\"#fff\"))",
- "id" : "+foldertitle",
- "* args" : "string folderpath",
+ "$ x_align" : "Clutter.ActorAlign.START",
"$ x_expand" : true,
- "* pack" : "add_child",
- "xtype" : "Text",
- "$ y_align" : "Clutter.ActorAlign.START",
"$ xns" : "Clutter",
+ "$ y_align" : "Clutter.ActorAlign.START",
+ "* args" : "string folderpath",
+ "* ctor" : "new Clutter.Text.full(\"Sans bold 14px\", GLib.Path.get_basename(folderpath), Clutter.Color.from_string(\"#fff\"))",
+ "* pack" : "add_child",
"bool y_expand" : false,
- "$ x_align" : "Clutter.ActorAlign.START"
+ "id" : "+foldertitle",
+ "xtype" : "Text"
},
{
- "listeners" : {
- "button_press_event" : " ( event) => {\n \n var f = JsRender.JsRender.factory(\"PlainFile\", _this.project, this.filepath);\n _this.open(f);\n return false;\n} ",
- "enter_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#fff\");\n this.el.color = Clutter.Color.from_string(\"#000\");\n return false;\n}",
- "leave_event" : "( event) => {\n this.el.background_color = Clutter.Color.from_string(\"#000\");\n this.el.color = Clutter.Color.from_string(\"#fff\");\n return false;\n}"
- },
- "* ctor" : "new Clutter.Text.full(\"Sans 10px\", GLib.Path.get_basename(filepath), Clutter.Color.from_string(\"#fff\"))",
+ "$ xns" : "Clutter",
"* args" : "string filepath",
- "id" : "*folderfile",
- "* init" : "{\n\tthis.filepath = filepath;\n}\n",
- "xtype" : "Text",
- "bool x_expand" : true,
+ "* ctor" : "new Clutter.Text.full(\"Sans 10px\", GLib.Path.get_basename(filepath), Clutter.Color.from_string(\"#fff\"))",
+ "* init" : [
+ "{",
+ "\tthis.filepath = filepath;",
+ "}",
+ ""
+ ],
+ "Clutter.ActorAlign x_align" : "Clutter.ActorAlign.START",
"Clutter.ActorAlign y_align" : "Clutter.ActorAlign.START",
- "string filepath" : "",
- "$ xns" : "Clutter",
"bool reactive" : true,
- "Clutter.ActorAlign x_align" : "Clutter.ActorAlign.START",
- "bool y_expand" : true
+ "bool x_expand" : true,
+ "bool y_expand" : true,
+ "id" : "*folderfile",
+ "listeners" : {
+ "button_press_event" : [
+ " ( event) => {",
+ " ",
+ " var f = JsRender.JsRender.factory(\"PlainFile\", _this.project, this.filepath);",
+ " _this.open(f);",
+ " return false;",
+ "} "
+ ],
+ "enter_event" : [
+ "( event) => {",
+ " this.el.background_color = Clutter.Color.from_string(\"#fff\");",
+ " this.el.color = Clutter.Color.from_string(\"#000\");",
+ " return false;",
+ "}"
+ ],
+ "leave_event" : [
+ "( event) => {",
+ " this.el.background_color = Clutter.Color.from_string(\"#000\");",
+ " this.el.color = Clutter.Color.from_string(\"#fff\");",
+ " return false;",
+ "}"
+ ]
+ },
+ "string filepath" : "",
+ "xtype" : "Text"
}
- ]
+ ],
+ "xtype" : "Actor"
}
- ]
+ ],
+ "xtype" : "Actor"
}
- ]
+ ],
+ "listeners" : {
+ "scroll_event" : [
+ "( event) => {",
+ " print(\"scroll event\\n\");",
+ " var y = _this.filelayout.el.y;",
+ " var dir = event.direction;",
+ " ",
+ " var last_child_bottom = _this.filelayout.el.last_child.y + _this.filelayout.el.last_child.height;",
+ " var bottompos = -1 * ( last_child_bottom - (0.5f * this.el.height));",
+ " ",
+ " switch (dir) {",
+ " case Clutter.ScrollDirection.UP:",
+ " print(\"Scroll up by %f\\n\", event.y);",
+ " y += event.y /2;",
+ " y = float.min(0, y); // ",
+ " break;",
+ " ",
+ " case Clutter.ScrollDirection.DOWN:",
+ " print(\"Scroll down by %f\\n\", event.y);",
+ " y -= event.y /2 ;",
+ " y = float.max(bottompos, y);",
+ " ",
+ " ",
+ " break;",
+ " \t case Clutter.ScrollDirection.SMOOTH:",
+ " \t double delta_x, delta_y;",
+ " \t event.get_scroll_delta(out delta_x, out delta_y);",
+ " //print(\"Scroll SMOOTH? by %f\\n\", delta_y * event.y);",
+ " y += ((float)delta_y * event.y * -1.0f) /2 ;",
+ " y = float.max(bottompos, y);",
+ " y = float.min(0, y); // ",
+ " ",
+ " break;",
+ " default:",
+ "\t print(\"scroll event = bad direction %s\\n\", dir.to_string());",
+ " return false;",
+ " }",
+ " // range of scroll -- can go up -- eg.. -ve value.",
+ " ",
+ "",
+ " ",
+ " print(\"Set scroll to %f (lcb=%f / height = %f)\\n\", y, last_child_bottom, this.el.height);",
+ " ",
+ " _this.filelayout.el.y = y;",
+ " return true;",
+ " ",
+ "}"
+ ]
+ },
+ "xtype" : "ScrollActor"
}
+ ],
+ "xtype" : "Actor",
+ "| void clearFiles" : [
+ "() {",
+ " ",
+ " this.filelayout.el.remove_all_children();",
+ " // we need to unref all the chidren that we loaded though...",
+ " ",
+ "}",
+ " "
+ ],
+ "| void loadProject" : [
+ "(Project.Project pr) {",
+ " // list all the files, and create new Xcls_fileitem for each one.",
+ " ",
+ " this.project = pr;",
+ " ",
+ " ",
+ " // LEAK --- we should unref all the chilren...",
+ " this.filelayout.el.y = 0;",
+ " this.clearFiles();",
+ " ",
+ " print(\"clutter files - load project: \" + pr.name +\"\\n\");",
+ " // should unref.. them hopefully.",
+ " ",
+ " this.project_title_name.el.text = pr.name;",
+ " this.project_title_path.el.text = pr.firstPath();",
+ " ",
+ " // file items contains a reference until we reload ...",
+ " this.fileitems = new Gee.ArrayList<Object>();",
+ "",
+ " ",
+ "",
+ " var fiter = pr.sortedFiles().list_iterator();",
+ " while (fiter.next()) {",
+ " var a = new Xcls_fileitem(this,fiter.get());",
+ " this.fileitems.add(a);",
+ "",
+ "// a.ref();",
+ " print(\"add to clutter file view: \" + fiter.get().name + \"\\n\");",
+ " this.filelayout.el.add_child(a.el);",
+ " }",
+ " ",
+ " // folders...",
+ " ",
+ " if (!(pr is Project.Gtk)) {",
+ " print (\"not gtk... skipping files\");",
+ " return;",
+ " }",
+ " var gpr = (Project.Gtk)pr;",
+ " var def = gpr.compilegroups.get(\"_default_\");",
+ " // not sure why the above is returng null!??",
+ " if (def == null) {",
+ " \t\tdef = new Project.GtkValaSettings(\"_default_\"); ",
+ " \t\tgpr.compilegroups.set(\"_default_\", def);",
+ " }",
+ "\t var items = def.sources;",
+ "\t\t ",
+ "\t\t ",
+ "\t ",
+ "\tfor(var i =0 ; i < items.size; i++) {",
+ "\t print (\"cheking folder %s\\n\", items.get(i));",
+ "\t var files = gpr.filesForOpen(items.get(i));",
+ "\t if (files.size < 1) {",
+ "\t continue;",
+ "\t }",
+ "",
+ "\t // add the directory... items.get(i);",
+ "\t var x = new Xcls_folderitem(this,items.get(i));",
+ "\t this.fileitems.add(x);",
+ "\t this.filelayout.el.add_child(x.el);",
+ "\t ",
+ "\t for(var j =0 ; j < files.size; j++) {",
+ "\t print (\"adding file %s\\n\", files.get(j));",
+ "\t ",
+ "\t var y = new Xcls_folderfile(this, files.get(j));",
+ "\t this.fileitems.add(y);",
+ "\t x.el.add_child(y.el);",
+ "",
+ "\t // add file to files.get(j);",
+ "\t ",
+ "\t }",
+ "\t ",
+ "\t ",
+ "\t //this.el.set_value(citer, 1, items.get(i) );",
+ "\t}",
+ " ",
+ " ",
+ " ",
+ " this.el.show();",
+ "}",
+ ""
+ ],
+ "| void set_size" : [
+ "(float w, float h) ",
+ "{",
+ " ",
+ " // called by window resize... with is alreaddy -50 (for the buttons?)",
+ " ",
+ "",
+ "",
+ "",
+ " if (this.el == null) {",
+ " print(\"object not ready yet?\");",
+ " return;",
+ " }",
+ " ",
+ " print(\"recv width %f, filelayoutw = %f\", w, w-200);",
+ " ",
+ " w = GLib.Math.floorf ( w/120.0f) * 120.0f;",
+ " ",
+ " ",
+ " ",
+ " ",
+ " //_this.filelayout_manager.el.max_column_width = w - 200;",
+ " _this.filelayout.el.width = w ;",
+ " ",
+ " this.el.set_size(",
+ " // this.el.get_stage().width-150,",
+ " w,",
+ " h // this.el.get_stage().height",
+ " );",
+ " ",
+ " // 100 right for buttons ..",
+ " this.el.set_position(75,0);",
+ " ",
+ " ",
+ " this.scroller.el.set_size(",
+ " // this.el.get_stage().width-150,",
+ " w,",
+ " h // this.el.get_stage().height",
+ " );",
+ " ",
+ " // 100 right for buttons ..",
+ " this.scroller.el.set_position(0,50);",
+ " // scroll...",
+ " _this.filelayout.el.y = 0.0f;",
+ " ",
+ "}",
+ ""
]
}
- ]
+ ],
+ "modOrder" : "",
+ "name" : "ClutterFiles",
+ "parent" : "",
+ "path" : "/home/alan/gitlive/roobuilder/src/Builder4/ClutterFiles.bjs",
+ "permname" : "",
+ "title" : ""
}
\ No newline at end of file
"//\t}"
],
"border_width" : 0,
- "default_height" : 500,
- "default_width" : 800,
+ "default_height" : 750,
+ "default_width" : 1200,
"id" : "MainWindow",
"items" : [
{
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"items" : [
{
- "$ xns" : "Gtk",
- "* pack" : "add",
- "bool use_popover" : false,
- "items" : [
- {
- "$ xns" : "Gtk",
- "* init" : [
- "{",
- " this.el.show_all();",
- "}",
- ""
- ],
- "* pack" : "set_popup",
- "id" : "topbarmenu",
- "items" : [
- {
- "$ xns" : "Gtk",
- "* pack" : "append",
- "listeners" : {
- "activate" : [
- "( ) => {",
- " _this.openNewWindow();",
- "}"
- ]
- },
- "string label" : "Open a new Window",
- "xtype" : "MenuItem"
- },
- {
- "$ xns" : "Gtk",
- "* pack" : "append",
- "xtype" : "SeparatorMenuItem"
- },
- {
- "$ xns" : "Gtk",
- "* pack" : "append",
- "listeners" : {
- "activate" : [
- " ( ) => {",
- " Resources.singleton().fetchStart();",
- "}"
- ]
- },
- "string label" : "Download updated Resources",
- "xtype" : "MenuItem"
- },
- {
- "$ xns" : "Gtk",
- "* pack" : "append",
- "listeners" : {
- "activate" : [
- "() => {",
- " About.singleton().el.show();",
- " }"
- ]
- },
- "string label" : "About the Builder",
- "xtype" : "MenuItem"
- }
- ],
- "xtype" : "Menu"
- },
- {
- "$ xns" : "Gtk",
- "* pack" : "set_image",
- "utf8 icon_name" : "help-about",
- "xtype" : "Image"
- }
+ "$ tooltop_text" : [
+ "\"Open a new Window",
+ "\""
],
- "xtype" : "MenuButton"
- },
- {
- "$ tooltop_text" : "\"Open File\"",
"$ xns" : "Gtk",
"* pack" : "add",
- "id" : "openbtn",
+ "bool always_show_image" : true,
+ "id" : "windownew",
"items" : [
{
"$ xns" : "Gtk",
"* pack" : "set_image",
- "utf8 icon_name" : "document-open",
+ "utf8 icon_name" : "window-new",
"xtype" : "Image"
}
],
"listeners" : {
"clicked" : [
" ( ) => {",
- " _this.windowstate.switchState(WindowState.State.FILES);",
+ " _this.openNewWindow();",
" ",
"",
"}"
]
},
+ "string label" : "New Window",
"xtype" : "Button"
},
{
+ "$ tooltop_text" : "\"Open File\"",
"$ xns" : "Gtk",
"* pack" : "add",
- "bool visible" : false,
- "id" : "openbackbtn",
+ "bool always_show_image" : true,
+ "id" : "open_projects_btn",
"items" : [
{
"$ xns" : "Gtk",
"* pack" : "set_image",
- "utf8 icon_name" : "go-previous",
+ "utf8 icon_name" : "system-file-manager",
"xtype" : "Image"
}
],
"listeners" : {
"clicked" : [
" ( ) => {",
- " ",
- " _this.windowstate.switchState(WindowState.State.PREVIEW);",
- " ",
+ " \t_this.windowstate.showPopoverFiles(this.el, _this.project);",
"",
"}"
]
},
- "utf8 tooltip_text" : "Back",
+ "string label" : "Files / Projects",
"xtype" : "Button"
}
],
],
"xtype" : "Actor"
},
- {
- "$ xns" : "Clutter",
- "* init" : "this.el.set_size(50.0f,50.0f);",
- "* pack" : "add_child",
- "id" : "editfilebutton",
- "items" : [
- {
- "$ xns" : "GtkClutter",
- "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
- "items" : [
- {
- "$ tooltip_text" : "\"File Details\"",
- "$ xns" : "Gtk",
- "* pack" : false,
- "height_request" : 50,
- "items" : [
- {
- "$ xns" : "Gtk",
- "* pack" : "set_image",
- "utf8 icon_name" : "document-properties",
- "xtype" : "Image"
- }
- ],
- "listeners" : {
- "clicked" : [
- " ( ) => {",
- " ",
- " // create a new file in project..",
- " if (_this.project == null || _this.windowstate.file == null) {",
- " return ;",
- " }",
- " _this.windowstate.file_details.show(",
- " _this.windowstate.file, this.el",
- " );",
- " ",
- " return ; ",
- "",
- "",
- "}"
- ]
- },
- "width_request" : 50,
- "xtype" : "Button"
- }
- ],
- "xtype" : "Actor"
- }
- ],
- "xtype" : "Actor"
- },
- {
- "$ xns" : "Clutter",
- "* init" : "this.el.set_size(50,50);",
- "* pack" : "add_child",
- "id" : "projecteditbutton",
- "items" : [
- {
- "$ xns" : "GtkClutter",
- "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
- "items" : [
- {
- "$ tooltip_text" : "\"Project Details\"",
- "$ xns" : "Gtk",
- "* pack" : false,
- "height_request" : 50,
- "items" : [
- {
- "$ xns" : "Gtk",
- "* pack" : "set_image",
- "utf8 icon_name" : "emblem-system",
- "xtype" : "Image"
- }
- ],
- "listeners" : {
- "clicked" : [
- " ( ) => {",
- " ",
- " _this.windowstate.projectPopoverShow(this.el);",
- " ",
- " ",
- "}"
- ]
- },
- "width_request" : 50,
- "xtype" : "Button"
- }
- ],
- "xtype" : "Actor"
- }
- ],
- "xtype" : "Actor"
- },
{
"$ xns" : "Clutter",
"* init" : "this.el.set_size(50,50);",
}
],
"xtype" : "Actor"
- },
- {
- "$ xns" : "Clutter",
- "* init" : "this.el.set_size(50.0f,50.0f);",
- "* pack" : "add_child",
- "id" : "addprojectbutton",
- "items" : [
- {
- "$ xns" : "GtkClutter",
- "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
- "items" : [
- {
- "$ tooltip_text" : "\"New\\nProj.\"",
- "$ xns" : "Gtk",
- "* pack" : false,
- "height_request" : 50,
- "items" : [
- {
- "$ xns" : "Gtk",
- "* pack" : "set_image",
- "utf8 icon_name" : "folder-new",
- "xtype" : "Image"
- }
- ],
- "listeners" : {
- "clicked" : [
- " ( ) => {",
- " ",
- " // create a new file in project..",
- " //Xcls_DialogNewComponent.singleton().show(",
- " var pe = EditProject.singleton();",
- " pe.el.set_transient_for(_this.el);",
- " pe.el.set_modal(true); ",
- " ",
- " var p = pe.show();",
- "",
- " if (p == null) {",
- " return;",
- " }",
- " ",
- " ",
- " _this.windowstate.left_projects.is_loaded = false; ",
- " _this.windowstate.left_projects.load();",
- " _this.windowstate.left_projects.selectProject(p);",
- " return ; ",
- "",
- "",
- "}"
- ]
- },
- "width_request" : 50,
- "xtype" : "Button"
- }
- ],
- "xtype" : "Actor"
- }
- ],
- "xtype" : "Actor"
- },
- {
- "$ xns" : "Clutter",
- "* init" : "this.el.set_size(50.0f,50.0f);",
- "* pack" : "add_child",
- "id" : "addfilebutton",
- "items" : [
- {
- "$ xns" : "GtkClutter",
- "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
- "items" : [
- {
- "$ tooltip_text" : "\"Add File\"",
- "$ xns" : "Gtk",
- "* pack" : false,
- "height_request" : 50,
- "items" : [
- {
- "$ xns" : "Gtk",
- "* pack" : "set_image",
- "utf8 icon_name" : "document-new",
- "xtype" : "Image"
- }
- ],
- "listeners" : {
- "clicked" : [
- " () => {",
- " // create a new file in project..",
- " print(\"add file selected\\n\");",
- " // what's the currently selected project...",
- " var proj = _this.windowstate.left_projects.getSelectedProject();",
- " ",
- " if (proj == null) {",
- "\t\tprint(\"no project selected?\\n\");",
- " return ;",
- " }",
- " ",
- " print(\"creating file?\");",
- " ",
- " var f = JsRender.JsRender.factory(proj.xtype, proj, \"\");",
- " _this.project = proj;",
- " print(\"showing popup?\");",
- " _this.windowstate.file_details.show(",
- " f, this.el",
- " );",
- " ",
- " ",
- " return ; ",
- "}"
- ]
- },
- "width_request" : 50,
- "xtype" : "Button"
- }
- ],
- "xtype" : "Actor"
- }
- ],
- "xtype" : "Actor"
- },
- {
- "$ xns" : "Clutter",
- "* init" : "this.el.set_size(50,50);",
- "* pack" : "add_child",
- "id" : "delprojectbutton",
- "items" : [
- {
- "$ xns" : "GtkClutter",
- "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
- "items" : [
- {
- "$ tooltip_text" : "\"Delete Project\"",
- "$ xns" : "Gtk",
- "* pack" : false,
- "height_request" : 50,
- "items" : [
- {
- "$ xns" : "Gtk",
- "* pack" : "set_image",
- "utf8 icon_name" : "user-trash",
- "xtype" : "Image"
- }
- ],
- "listeners" : {
- "clicked" : [
- " ( ) => {",
- " ",
- " var cd = DialogConfirm.singleton();",
- " cd.el.set_transient_for(_this.el);",
- " cd.el.set_modal(true);",
- "",
- " var project = _this.windowstate.left_projects.getSelectedProject();",
- " if (project == null) {",
- " print(\"SKIP - no project\\n\");",
- " return;",
- " }",
- " ",
- " ",
- " if (Gtk.ResponseType.YES != cd.show(\"Confirm\", ",
- " \"Are you sure you want to delete project %s\".printf(project.name))) {",
- " return;",
- " }",
- " ",
- "",
- " // confirm?",
- " Project.Project.remove(project);",
- " _this.project = null;",
- " ",
- " _this.windowstate.left_projects.is_loaded = false;",
- " _this.windowstate.left_projects.load();",
- " _this.windowstate.clutterfiles.clearFiles();",
- "",
- "}"
- ]
- },
- "width_request" : 50,
- "xtype" : "Button"
- }
- ],
- "xtype" : "Actor"
- }
- ],
- "xtype" : "Actor"
}
],
"xtype" : "Actor"
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"bool homogeneous" : false,
"items" : [
+ {
+ "$ tooltip_text" : "\"Project Details\"",
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "bool always_show_image" : true,
+ "height_request" : 50,
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "set_image",
+ "utf8 icon_name" : "emblem-system",
+ "xtype" : "Image"
+ }
+ ],
+ "listeners" : {
+ "clicked" : [
+ " ( ) => {",
+ " ",
+ " _this.windowstate.projectPopoverShow(this.el, _this.project);",
+ " ",
+ " ",
+ "}"
+ ]
+ },
+ "string label" : "Edit Project Settings",
+ "width_request" : 50,
+ "xtype" : "Button"
+ },
+ {
+ "$ tooltip_text" : "\"File Details\"",
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "bool always_show_image" : true,
+ "height_request" : 50,
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "set_image",
+ "utf8 icon_name" : "document-properties",
+ "xtype" : "Image"
+ }
+ ],
+ "listeners" : {
+ "clicked" : [
+ " ( ) => {",
+ " ",
+ " // create a new file in project..",
+ " if (_this.project == null || _this.windowstate.file == null) {",
+ " return ;",
+ " }",
+ " _this.windowstate.file_details.show(",
+ " _this.windowstate.file, this.el",
+ " );",
+ " ",
+ " return ; ",
+ "",
+ "",
+ "}"
+ ]
+ },
+ "string label" : "Edit File Properties",
+ "width_request" : 50,
+ "xtype" : "Button"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "bool always_show_image" : true,
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* init" : [
+ "{",
+ " this.el.show_all();",
+ "}",
+ ""
+ ],
+ "* pack" : "set_popup",
+ "id" : "topbarmenu",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "append",
+ "listeners" : {
+ "activate" : [
+ " ( ) => {",
+ " Resources.singleton().fetchStart();",
+ "}"
+ ]
+ },
+ "string label" : "Download updated Resources",
+ "xtype" : "MenuItem"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "append",
+ "listeners" : {
+ "activate" : [
+ "() => {",
+ " About.singleton().el.show();",
+ " }"
+ ]
+ },
+ "string label" : "About the Builder",
+ "xtype" : "MenuItem"
+ }
+ ],
+ "xtype" : "Menu"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "set_image",
+ "utf8 icon_name" : "dialog-information",
+ "xtype" : "Image"
+ }
+ ],
+ "string label" : "About",
+ "xtype" : "MenuButton"
+ },
{
"$ xns" : "Gtk",
"* pack" : "pack_start,true,true,0",
"xtype" : "ImageMenuItem"
}
],
+ "string tooltip_text" : "Update Resources / About Roobuilder",
"xtype" : "MenuBar"
},
{
"",
" w.el.show_all();",
" w.initChildren();",
- " w.windowstate.switchState(WindowState.State.FILES);",
+ " w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project);",
+ " // should open the file dialog...",
+ " //w.windowstate.switchState(WindowState.State.FILES);",
"}",
""
]
return _MainWindow;
}
public Xcls_headerbar headerbar;
- public Xcls_topbarmenu topbarmenu;
- public Xcls_openbtn openbtn;
- public Xcls_openbackbtn openbackbtn;
+ public Xcls_windownew windownew;
+ public Xcls_open_projects_btn open_projects_btn;
public Xcls_vbox vbox;
public Xcls_mainpane mainpane;
public Xcls_leftpane leftpane;
public Xcls_addpropsview addpropsview;
public Xcls_buttonlayout buttonlayout;
public Xcls_backbutton backbutton;
- public Xcls_editfilebutton editfilebutton;
- public Xcls_projecteditbutton projecteditbutton;
public Xcls_objectshowbutton objectshowbutton;
public Xcls_addpropbutton addpropbutton;
public Xcls_addlistenerbutton addlistenerbutton;
- public Xcls_addprojectbutton addprojectbutton;
- public Xcls_addfilebutton addfilebutton;
- public Xcls_delprojectbutton delprojectbutton;
+ public Xcls_topbarmenu topbarmenu;
public Xcls_statusbar statusbar;
public Xcls_search_entry search_entry;
public Xcls_search_results search_results;
// set gobject values
this.el.border_width = 0;
- this.el.default_height = 500;
- this.el.default_width = 800;
+ this.el.default_height = 750;
+ this.el.default_width = 1200;
var child_0 = new Xcls_headerbar( _this );
child_0.ref();
this.el.set_titlebar ( child_0.el );
w.el.show_all();
w.initChildren();
- w.windowstate.switchState(WindowState.State.FILES);
+ w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project);
+ // should open the file dialog...
+ //w.windowstate.switchState(WindowState.State.FILES);
}
public void initChildren () {
// this needs putting in a better place..
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_MenuButton4( _this );
+ var child_0 = new Xcls_windownew( _this );
child_0.ref();
this.el.add ( child_0.el );
- var child_1 = new Xcls_openbtn( _this );
+ var child_1 = new Xcls_open_projects_btn( _this );
child_1.ref();
this.el.add ( child_1.el );
- var child_2 = new Xcls_openbackbtn( _this );
- child_2.ref();
- this.el.add ( child_2.el );
- }
-
- // user defined functions
- }
- public class Xcls_MenuButton4 : Object
- {
- public Gtk.MenuButton el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_MenuButton4(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.MenuButton();
-
- // my vars (dec)
-
- // set gobject values
- this.el.use_popover = false;
- var child_0 = new Xcls_topbarmenu( _this );
- child_0.ref();
- this.el.set_popup ( child_0.el );
- var child_1 = new Xcls_Image10( _this );
- child_1.ref();
- this.el.set_image ( child_1.el );
- }
-
- // user defined functions
- }
- public class Xcls_topbarmenu : Object
- {
- public Gtk.Menu el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_topbarmenu(Xcls_MainWindow _owner )
- {
- _this = _owner;
- _this.topbarmenu = this;
- this.el = new Gtk.Menu();
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_MenuItem6( _this );
- child_0.ref();
- this.el.append ( child_0.el );
- var child_1 = new Xcls_SeparatorMenuItem7( _this );
- child_1.ref();
- this.el.append ( child_1.el );
- var child_2 = new Xcls_MenuItem8( _this );
- child_2.ref();
- this.el.append ( child_2.el );
- var child_3 = new Xcls_MenuItem9( _this );
- child_3.ref();
- this.el.append ( child_3.el );
-
- // init method
-
- {
- this.el.show_all();
- }
- }
-
- // user defined functions
- }
- public class Xcls_MenuItem6 : Object
- {
- public Gtk.MenuItem el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_MenuItem6(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.MenuItem();
-
- // my vars (dec)
-
- // set gobject values
- this.el.label = "Open a new Window";
-
- //listeners
- this.el.activate.connect( ( ) => {
- _this.openNewWindow();
- });
- }
-
- // user defined functions
- }
-
- public class Xcls_SeparatorMenuItem7 : Object
- {
- public Gtk.SeparatorMenuItem el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_SeparatorMenuItem7(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.SeparatorMenuItem();
-
- // my vars (dec)
-
- // set gobject values
- }
-
- // user defined functions
- }
-
- public class Xcls_MenuItem8 : Object
- {
- public Gtk.MenuItem el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_MenuItem8(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.MenuItem();
-
- // my vars (dec)
-
- // set gobject values
- this.el.label = "Download updated Resources";
-
- //listeners
- this.el.activate.connect( ( ) => {
- Resources.singleton().fetchStart();
- });
- }
-
- // user defined functions
- }
-
- public class Xcls_MenuItem9 : Object
- {
- public Gtk.MenuItem el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_MenuItem9(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.MenuItem();
-
- // my vars (dec)
-
- // set gobject values
- this.el.label = "About the Builder";
-
- //listeners
- this.el.activate.connect( () => {
- About.singleton().el.show();
- });
- }
-
- // user defined functions
- }
-
-
- public class Xcls_Image10 : Object
- {
- public Gtk.Image el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Image10(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.Image();
-
- // my vars (dec)
-
- // set gobject values
- this.el.icon_name = "help-about";
}
// user defined functions
}
-
-
- public class Xcls_openbtn : Object
+ public class Xcls_windownew : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_openbtn(Xcls_MainWindow _owner )
+ public Xcls_windownew(Xcls_MainWindow _owner )
{
_this = _owner;
- _this.openbtn = this;
+ _this.windownew = this;
this.el = new Gtk.Button();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Image12( _this );
+ this.el.always_show_image = true;
+ this.el.label = "New Window";
+ var child_0 = new Xcls_Image5( _this );
child_0.ref();
this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( ( ) => {
- _this.windowstate.switchState(WindowState.State.FILES);
+ _this.openNewWindow();
});
// user defined functions
}
- public class Xcls_Image12 : Object
+ public class Xcls_Image5 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image12(Xcls_MainWindow _owner )
+ public Xcls_Image5(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "document-open";
+ this.el.icon_name = "window-new";
}
// user defined functions
}
- public class Xcls_openbackbtn : Object
+ public class Xcls_open_projects_btn : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_openbackbtn(Xcls_MainWindow _owner )
+ public Xcls_open_projects_btn(Xcls_MainWindow _owner )
{
_this = _owner;
- _this.openbackbtn = this;
+ _this.open_projects_btn = this;
this.el = new Gtk.Button();
// my vars (dec)
// set gobject values
- this.el.tooltip_text = "Back";
- this.el.visible = false;
- var child_0 = new Xcls_Image14( _this );
+ this.el.always_show_image = true;
+ this.el.label = "Files / Projects";
+ var child_0 = new Xcls_Image7( _this );
child_0.ref();
this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( ( ) => {
-
- _this.windowstate.switchState(WindowState.State.PREVIEW);
-
+ _this.windowstate.showPopoverFiles(this.el, _this.project);
});
}
// user defined functions
}
- public class Xcls_Image14 : Object
+ public class Xcls_Image7 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image14(Xcls_MainWindow _owner )
+ public Xcls_Image7(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "go-previous";
+ this.el.icon_name = "system-file-manager";
}
// user defined functions
var child_0 = new Xcls_mainpane( _this );
child_0.ref();
this.el.pack_start ( child_0.el , true,true,0 );
- var child_1 = new Xcls_Box65( _this );
+ var child_1 = new Xcls_Box38( _this );
child_1.ref();
this.el.pack_end ( child_1.el , false,true,0 );
}
var child_0 = new Xcls_leftpane( _this );
child_0.ref();
this.el.add1 ( child_0.el );
- var child_1 = new Xcls_Box21( _this );
+ var child_1 = new Xcls_Box14( _this );
child_1.ref();
this.el.add2 ( child_1.el );
}
- public class Xcls_Box21 : Object
+ public class Xcls_Box14 : Object
{
public Gtk.Box el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Box21(Xcls_MainWindow _owner )
+ public Xcls_Box14(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_BoxLayout28( _this );
+ var child_0 = new Xcls_BoxLayout21( _this );
child_0.ref();
this.el.layout_manager = child_0.el;
var child_1 = new Xcls_backbutton( _this );
child_1.ref();
this.el.add_child ( child_1.el );
- var child_2 = new Xcls_editfilebutton( _this );
+ var child_2 = new Xcls_objectshowbutton( _this );
child_2.ref();
this.el.add_child ( child_2.el );
- var child_3 = new Xcls_projecteditbutton( _this );
+ var child_3 = new Xcls_addpropbutton( _this );
child_3.ref();
this.el.add_child ( child_3.el );
- var child_4 = new Xcls_objectshowbutton( _this );
+ var child_4 = new Xcls_addlistenerbutton( _this );
child_4.ref();
this.el.add_child ( child_4.el );
- var child_5 = new Xcls_addpropbutton( _this );
- child_5.ref();
- this.el.add_child ( child_5.el );
- var child_6 = new Xcls_addlistenerbutton( _this );
- child_6.ref();
- this.el.add_child ( child_6.el );
- var child_7 = new Xcls_addprojectbutton( _this );
- child_7.ref();
- this.el.add_child ( child_7.el );
- var child_8 = new Xcls_addfilebutton( _this );
- child_8.ref();
- this.el.add_child ( child_8.el );
- var child_9 = new Xcls_delprojectbutton( _this );
- child_9.ref();
- this.el.add_child ( child_9.el );
// init method
// user defined functions
}
- public class Xcls_BoxLayout28 : Object
+ public class Xcls_BoxLayout21 : Object
{
public Clutter.BoxLayout el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_BoxLayout28(Xcls_MainWindow _owner )
+ public Xcls_BoxLayout21(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Clutter.BoxLayout();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Actor30( _this );
+ var child_0 = new Xcls_Actor23( _this );
child_0.ref();
this.el.add_child ( child_0.el );
// user defined functions
}
- public class Xcls_Actor30 : Object
+ public class Xcls_Actor23 : Object
{
public GtkClutter.Actor el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Actor30(Xcls_MainWindow _owner )
+ public Xcls_Actor23(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new GtkClutter.Actor();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Button31( _this );
+ var child_0 = new Xcls_Button24( _this );
child_0.ref();
// init method
// user defined functions
}
- public class Xcls_Button31 : Object
+ public class Xcls_Button24 : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Button31(Xcls_MainWindow _owner )
+ public Xcls_Button24(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Button();
this.el.width_request = 50;
this.el.height_request = 50;
this.el.tooltip_text = "Back";
- var child_0 = new Xcls_Image32( _this );
+ var child_0 = new Xcls_Image25( _this );
child_0.ref();
this.el.set_image ( child_0.el );
// user defined functions
}
- public class Xcls_Image32 : Object
+ public class Xcls_Image25 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image32(Xcls_MainWindow _owner )
+ public Xcls_Image25(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
- public class Xcls_editfilebutton : Object
+ public class Xcls_objectshowbutton : Object
{
public Clutter.Actor el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_editfilebutton(Xcls_MainWindow _owner )
+ public Xcls_objectshowbutton(Xcls_MainWindow _owner )
{
_this = _owner;
- _this.editfilebutton = this;
+ _this.objectshowbutton = this;
this.el = new Clutter.Actor();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Actor34( _this );
+ var child_0 = new Xcls_Actor27( _this );
child_0.ref();
this.el.add_child ( child_0.el );
// init method
- this.el.set_size(50.0f,50.0f);
+ this.el.set_size(50,50);
+
+ //listeners
+ this.el.enter_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#333");
+ return false;
+ });
+ this.el.leave_event.connect( ( event) => {
+ this.el.background_color = Clutter.Color.from_string("#000");
+ return false;
+ });
}
// user defined functions
}
- public class Xcls_Actor34 : Object
+ public class Xcls_Actor27 : Object
{
public GtkClutter.Actor el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Actor34(Xcls_MainWindow _owner )
+ public Xcls_Actor27(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new GtkClutter.Actor();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Button35( _this );
+ var child_0 = new Xcls_Button28( _this );
child_0.ref();
// init method
// user defined functions
}
- public class Xcls_Button35 : Object
+ public class Xcls_Button28 : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Button35(Xcls_MainWindow _owner )
+ public Xcls_Button28(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Button();
// set gobject values
this.el.width_request = 50;
this.el.height_request = 50;
- this.el.tooltip_text = "File Details";
- var child_0 = new Xcls_Image36( _this );
+ this.el.tooltip_text = "Add Child Element";
+ var child_0 = new Xcls_Image29( _this );
child_0.ref();
this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( ( ) => {
-
- // create a new file in project..
- if (_this.project == null || _this.windowstate.file == null) {
- return ;
- }
- _this.windowstate.file_details.show(
- _this.windowstate.file, this.el
- );
-
- return ;
-
+
+ _this.windowstate.showAddObject(this.el);
+
});
}
// user defined functions
}
- public class Xcls_Image36 : Object
+ public class Xcls_Image29 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image36(Xcls_MainWindow _owner )
+ public Xcls_Image29(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "document-properties";
+ this.el.icon_name = "list-add";
}
// user defined functions
- public class Xcls_projecteditbutton : Object
+ public class Xcls_addpropbutton : Object
{
public Clutter.Actor el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_projecteditbutton(Xcls_MainWindow _owner )
+ public Xcls_addpropbutton(Xcls_MainWindow _owner )
{
_this = _owner;
- _this.projecteditbutton = this;
+ _this.addpropbutton = this;
this.el = new Clutter.Actor();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Actor38( _this );
+ var child_0 = new Xcls_Actor31( _this );
child_0.ref();
this.el.add_child ( child_0.el );
// user defined functions
}
- public class Xcls_Actor38 : Object
+ public class Xcls_Actor31 : Object
{
public GtkClutter.Actor el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Actor38(Xcls_MainWindow _owner )
+ public Xcls_Actor31(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new GtkClutter.Actor();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Button39( _this );
+ var child_0 = new Xcls_Button32( _this );
child_0.ref();
// init method
// user defined functions
}
- public class Xcls_Button39 : Object
+ public class Xcls_Button32 : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Button39(Xcls_MainWindow _owner )
+ public Xcls_Button32(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Button();
// set gobject values
this.el.width_request = 50;
this.el.height_request = 50;
- this.el.tooltip_text = "Project Details";
- var child_0 = new Xcls_Image40( _this );
+ this.el.tooltip_text = "Add Property";
+ var child_0 = new Xcls_Image33( _this );
child_0.ref();
this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( ( ) => {
-
- _this.windowstate.projectPopoverShow(this.el);
-
+
+ _this.windowstate.showProps(this.el, "props");
+
});
}
// user defined functions
}
- public class Xcls_Image40 : Object
+ public class Xcls_Image33 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image40(Xcls_MainWindow _owner )
+ public Xcls_Image33(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "emblem-system";
+ this.el.icon_name = "format-justify-left";
}
// user defined functions
- public class Xcls_objectshowbutton : Object
+ public class Xcls_addlistenerbutton : Object
{
public Clutter.Actor el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_objectshowbutton(Xcls_MainWindow _owner )
+ public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
{
_this = _owner;
- _this.objectshowbutton = this;
+ _this.addlistenerbutton = this;
this.el = new Clutter.Actor();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Actor42( _this );
+ var child_0 = new Xcls_Actor35( _this );
child_0.ref();
this.el.add_child ( child_0.el );
// init method
this.el.set_size(50,50);
-
- //listeners
- this.el.enter_event.connect( ( event) => {
- this.el.background_color = Clutter.Color.from_string("#333");
- return false;
- });
- this.el.leave_event.connect( ( event) => {
- this.el.background_color = Clutter.Color.from_string("#000");
- return false;
- });
}
// user defined functions
}
- public class Xcls_Actor42 : Object
+ public class Xcls_Actor35 : Object
{
public GtkClutter.Actor el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Actor42(Xcls_MainWindow _owner )
+ public Xcls_Actor35(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new GtkClutter.Actor();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Button43( _this );
+ var child_0 = new Xcls_Button36( _this );
child_0.ref();
// init method
// user defined functions
}
- public class Xcls_Button43 : Object
+ public class Xcls_Button36 : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Button43(Xcls_MainWindow _owner )
+ public Xcls_Button36(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Button();
// set gobject values
this.el.width_request = 50;
this.el.height_request = 50;
- this.el.tooltip_text = "Add Child Element";
- var child_0 = new Xcls_Image44( _this );
+ this.el.tooltip_text = "Add Event Code";
+ var child_0 = new Xcls_Image37( _this );
child_0.ref();
this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( ( ) => {
-
- _this.windowstate.showAddObject(this.el);
-
- });
- }
-
- // user defined functions
- }
- public class Xcls_Image44 : Object
- {
- public Gtk.Image el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Image44(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.Image();
-
- // my vars (dec)
-
- // set gobject values
- this.el.icon_name = "list-add";
- }
-
- // user defined functions
- }
-
-
-
-
- public class Xcls_addpropbutton : Object
- {
- public Clutter.Actor el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_addpropbutton(Xcls_MainWindow _owner )
- {
- _this = _owner;
- _this.addpropbutton = this;
- this.el = new Clutter.Actor();
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_Actor46( _this );
- child_0.ref();
- this.el.add_child ( child_0.el );
-
- // init method
-
- this.el.set_size(50,50);
- }
-
- // user defined functions
- }
- public class Xcls_Actor46 : Object
- {
- public GtkClutter.Actor el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Actor46(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new GtkClutter.Actor();
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_Button47( _this );
- child_0.ref();
-
- // init method
-
- ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
- }
-
- // user defined functions
- }
- public class Xcls_Button47 : Object
- {
- public Gtk.Button el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Button47(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.Button();
-
- // my vars (dec)
-
- // set gobject values
- this.el.width_request = 50;
- this.el.height_request = 50;
- this.el.tooltip_text = "Add Property";
- var child_0 = new Xcls_Image48( _this );
- child_0.ref();
- this.el.set_image ( child_0.el );
-
- //listeners
- this.el.clicked.connect( ( ) => {
-
- _this.windowstate.showProps(this.el, "props");
+ _this.windowstate.showProps(this.el, "signals");
+
});
}
// user defined functions
}
- public class Xcls_Image48 : Object
+ public class Xcls_Image37 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image48(Xcls_MainWindow _owner )
+ public Xcls_Image37(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "format-justify-left";
+ this.el.icon_name = "appointment-new";
}
// user defined functions
- public class Xcls_addlistenerbutton : Object
- {
- public Clutter.Actor el;
- private Xcls_MainWindow _this;
- // my vars (def)
- // ctor
- public Xcls_addlistenerbutton(Xcls_MainWindow _owner )
- {
- _this = _owner;
- _this.addlistenerbutton = this;
- this.el = new Clutter.Actor();
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_Actor50( _this );
- child_0.ref();
- this.el.add_child ( child_0.el );
- // init method
-
- this.el.set_size(50,50);
- }
-
- // user defined functions
- }
- public class Xcls_Actor50 : Object
+ public class Xcls_Box38 : Object
{
- public GtkClutter.Actor el;
+ public Gtk.Box el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Actor50(Xcls_MainWindow _owner )
+ public Xcls_Box38(Xcls_MainWindow _owner )
{
_this = _owner;
- this.el = new GtkClutter.Actor();
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Button51( _this );
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_Button39( _this );
child_0.ref();
-
- // init method
-
- ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_Button41( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_MenuButton43( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ var child_3 = new Xcls_Label48( _this );
+ child_3.ref();
+ this.el.pack_start ( child_3.el , true,true,0 );
+ var child_4 = new Xcls_statusbar( _this );
+ child_4.ref();
+ this.el.pack_start ( child_4.el , true,true,0 );
+ var child_5 = new Xcls_search_entry( _this );
+ child_5.ref();
+ this.el.pack_start ( child_5.el , false,true,0 );
+ var child_6 = new Xcls_MenuBar51( _this );
+ child_6.ref();
+ this.el.add ( child_6.el );
+ var child_7 = new Xcls_statusbar_compile_spinner( _this );
+ child_7.ref();
+ this.el.add ( child_7.el );
}
// user defined functions
}
- public class Xcls_Button51 : Object
+ public class Xcls_Button39 : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Button51(Xcls_MainWindow _owner )
+ public Xcls_Button39(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Button();
// set gobject values
this.el.width_request = 50;
this.el.height_request = 50;
- this.el.tooltip_text = "Add Event Code";
- var child_0 = new Xcls_Image52( _this );
+ this.el.always_show_image = true;
+ this.el.tooltip_text = "Project Details";
+ this.el.label = "Edit Project Settings";
+ var child_0 = new Xcls_Image40( _this );
child_0.ref();
this.el.set_image ( child_0.el );
//listeners
this.el.clicked.connect( ( ) => {
-
+
+ _this.windowstate.projectPopoverShow(this.el, _this.project);
+
- _this.windowstate.showProps(this.el, "signals");
-
-
});
}
// user defined functions
}
- public class Xcls_Image52 : Object
+ public class Xcls_Image40 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image52(Xcls_MainWindow _owner )
+ public Xcls_Image40(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "appointment-new";
+ this.el.icon_name = "emblem-system";
}
// user defined functions
}
-
-
- public class Xcls_addprojectbutton : Object
- {
- public Clutter.Actor el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_addprojectbutton(Xcls_MainWindow _owner )
- {
- _this = _owner;
- _this.addprojectbutton = this;
- this.el = new Clutter.Actor();
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_Actor54( _this );
- child_0.ref();
- this.el.add_child ( child_0.el );
-
- // init method
-
- this.el.set_size(50.0f,50.0f);
- }
-
- // user defined functions
- }
- public class Xcls_Actor54 : Object
- {
- public GtkClutter.Actor el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Actor54(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new GtkClutter.Actor();
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_Button55( _this );
- child_0.ref();
-
- // init method
-
- ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
- }
-
- // user defined functions
- }
- public class Xcls_Button55 : Object
+ public class Xcls_Button41 : Object
{
public Gtk.Button el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Button55(Xcls_MainWindow _owner )
+ public Xcls_Button41(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Button();
// set gobject values
this.el.width_request = 50;
this.el.height_request = 50;
- this.el.tooltip_text = "New\nProj.";
- var child_0 = new Xcls_Image56( _this );
+ this.el.always_show_image = true;
+ this.el.tooltip_text = "File Details";
+ this.el.label = "Edit File Properties";
+ var child_0 = new Xcls_Image42( _this );
child_0.ref();
this.el.set_image ( child_0.el );
this.el.clicked.connect( ( ) => {
// create a new file in project..
- //Xcls_DialogNewComponent.singleton().show(
- var pe = EditProject.singleton();
- pe.el.set_transient_for(_this.el);
- pe.el.set_modal(true);
-
- var p = pe.show();
-
- if (p == null) {
- return;
+ if (_this.project == null || _this.windowstate.file == null) {
+ return ;
}
-
-
- _this.windowstate.left_projects.is_loaded = false;
- _this.windowstate.left_projects.load();
- _this.windowstate.left_projects.selectProject(p);
+ _this.windowstate.file_details.show(
+ _this.windowstate.file, this.el
+ );
+
return ;
// user defined functions
}
- public class Xcls_Image56 : Object
+ public class Xcls_Image42 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image56(Xcls_MainWindow _owner )
+ public Xcls_Image42(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "folder-new";
+ this.el.icon_name = "document-properties";
}
// user defined functions
}
-
-
- public class Xcls_addfilebutton : Object
+ public class Xcls_MenuButton43 : Object
{
- public Clutter.Actor el;
+ public Gtk.MenuButton el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_addfilebutton(Xcls_MainWindow _owner )
+ public Xcls_MenuButton43(Xcls_MainWindow _owner )
{
_this = _owner;
- _this.addfilebutton = this;
- this.el = new Clutter.Actor();
+ this.el = new Gtk.MenuButton();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Actor58( _this );
+ this.el.always_show_image = true;
+ this.el.label = "About";
+ var child_0 = new Xcls_topbarmenu( _this );
child_0.ref();
- this.el.add_child ( child_0.el );
-
- // init method
-
- this.el.set_size(50.0f,50.0f);
+ this.el.set_popup ( child_0.el );
+ var child_1 = new Xcls_Image47( _this );
+ child_1.ref();
+ this.el.set_image ( child_1.el );
}
// user defined functions
}
- public class Xcls_Actor58 : Object
+ public class Xcls_topbarmenu : Object
{
- public GtkClutter.Actor el;
+ public Gtk.Menu el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Actor58(Xcls_MainWindow _owner )
+ public Xcls_topbarmenu(Xcls_MainWindow _owner )
{
_this = _owner;
- this.el = new GtkClutter.Actor();
+ _this.topbarmenu = this;
+ this.el = new Gtk.Menu();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Button59( _this );
+ var child_0 = new Xcls_MenuItem45( _this );
child_0.ref();
+ this.el.append ( child_0.el );
+ var child_1 = new Xcls_MenuItem46( _this );
+ child_1.ref();
+ this.el.append ( child_1.el );
// init method
- ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ {
+ this.el.show_all();
+ }
}
// user defined functions
}
- public class Xcls_Button59 : Object
+ public class Xcls_MenuItem45 : Object
{
- public Gtk.Button el;
+ public Gtk.MenuItem el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Button59(Xcls_MainWindow _owner )
+ public Xcls_MenuItem45(Xcls_MainWindow _owner )
{
_this = _owner;
- this.el = new Gtk.Button();
+ this.el = new Gtk.MenuItem();
// my vars (dec)
// set gobject values
- this.el.width_request = 50;
- this.el.height_request = 50;
- this.el.tooltip_text = "Add File";
- var child_0 = new Xcls_Image60( _this );
- child_0.ref();
- this.el.set_image ( child_0.el );
+ this.el.label = "Download updated Resources";
//listeners
- this.el.clicked.connect( () => {
- // create a new file in project..
- print("add file selected\n");
- // what's the currently selected project...
- var proj = _this.windowstate.left_projects.getSelectedProject();
-
- if (proj == null) {
- print("no project selected?\n");
- return ;
- }
-
- print("creating file?");
-
- var f = JsRender.JsRender.factory(proj.xtype, proj, "");
- _this.project = proj;
- print("showing popup?");
- _this.windowstate.file_details.show(
- f, this.el
- );
-
-
- return ;
+ this.el.activate.connect( ( ) => {
+ Resources.singleton().fetchStart();
});
}
// user defined functions
}
- public class Xcls_Image60 : Object
- {
- public Gtk.Image el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Image60(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.Image();
-
- // my vars (dec)
-
- // set gobject values
- this.el.icon_name = "document-new";
- }
-
- // user defined functions
- }
-
-
-
- public class Xcls_delprojectbutton : Object
+ public class Xcls_MenuItem46 : Object
{
- public Clutter.Actor el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_delprojectbutton(Xcls_MainWindow _owner )
- {
- _this = _owner;
- _this.delprojectbutton = this;
- this.el = new Clutter.Actor();
-
- // my vars (dec)
-
- // set gobject values
- var child_0 = new Xcls_Actor62( _this );
- child_0.ref();
- this.el.add_child ( child_0.el );
-
- // init method
-
- this.el.set_size(50,50);
- }
-
- // user defined functions
- }
- public class Xcls_Actor62 : Object
- {
- public GtkClutter.Actor el;
+ public Gtk.MenuItem el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Actor62(Xcls_MainWindow _owner )
+ public Xcls_MenuItem46(Xcls_MainWindow _owner )
{
_this = _owner;
- this.el = new GtkClutter.Actor();
+ this.el = new Gtk.MenuItem();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Button63( _this );
- child_0.ref();
-
- // init method
+ this.el.label = "About the Builder";
- ((Gtk.Container)(this.el.get_widget())).add ( child_0.el);
+ //listeners
+ this.el.activate.connect( () => {
+ About.singleton().el.show();
+ });
}
// user defined functions
}
- public class Xcls_Button63 : Object
- {
- public Gtk.Button el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
- // ctor
- public Xcls_Button63(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.Button();
-
- // my vars (dec)
- // set gobject values
- this.el.width_request = 50;
- this.el.height_request = 50;
- this.el.tooltip_text = "Delete Project";
- var child_0 = new Xcls_Image64( _this );
- child_0.ref();
- this.el.set_image ( child_0.el );
-
- //listeners
- this.el.clicked.connect( ( ) => {
-
- var cd = DialogConfirm.singleton();
- cd.el.set_transient_for(_this.el);
- cd.el.set_modal(true);
-
- var project = _this.windowstate.left_projects.getSelectedProject();
- if (project == null) {
- print("SKIP - no project\n");
- return;
- }
-
-
- if (Gtk.ResponseType.YES != cd.show("Confirm",
- "Are you sure you want to delete project %s".printf(project.name))) {
- return;
- }
-
-
- // confirm?
- Project.Project.remove(project);
- _this.project = null;
-
- _this.windowstate.left_projects.is_loaded = false;
- _this.windowstate.left_projects.load();
- _this.windowstate.clutterfiles.clearFiles();
-
- });
- }
-
- // user defined functions
- }
- public class Xcls_Image64 : Object
+ public class Xcls_Image47 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image64(Xcls_MainWindow _owner )
+ public Xcls_Image47(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// my vars (dec)
// set gobject values
- this.el.icon_name = "user-trash";
+ this.el.icon_name = "dialog-information";
}
// user defined functions
}
-
-
-
-
-
-
- public class Xcls_Box65 : Object
- {
- public Gtk.Box el;
- private Xcls_MainWindow _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Box65(Xcls_MainWindow _owner )
- {
- _this = _owner;
- this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
-
- // my vars (dec)
-
- // set gobject values
- this.el.homogeneous = false;
- var child_0 = new Xcls_Label66( _this );
- child_0.ref();
- this.el.pack_start ( child_0.el , true,true,0 );
- var child_1 = new Xcls_statusbar( _this );
- child_1.ref();
- this.el.pack_start ( child_1.el , true,true,0 );
- var child_2 = new Xcls_search_entry( _this );
- child_2.ref();
- this.el.pack_start ( child_2.el , false,true,0 );
- var child_3 = new Xcls_MenuBar69( _this );
- child_3.ref();
- this.el.add ( child_3.el );
- var child_4 = new Xcls_statusbar_compile_spinner( _this );
- child_4.ref();
- this.el.add ( child_4.el );
- }
-
- // user defined functions
- }
- public class Xcls_Label66 : Object
+ public class Xcls_Label48 : Object
{
public Gtk.Label el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Label66(Xcls_MainWindow _owner )
+ public Xcls_Label48(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Label( " " );
}
}
- public class Xcls_MenuBar69 : Object
+ public class Xcls_MenuBar51 : Object
{
public Gtk.MenuBar el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_MenuBar69(Xcls_MainWindow _owner )
+ public Xcls_MenuBar51(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.MenuBar();
// my vars (dec)
// set gobject values
+ this.el.tooltip_text = "Update Resources / About Roobuilder";
var child_0 = new Xcls_search_results( _this );
child_0.ref();
this.el.add ( child_0.el );
// set gobject values
this.el.always_show_image = true;
this.el.label = "Matches";
- var child_0 = new Xcls_Image71( _this );
+ var child_0 = new Xcls_Image53( _this );
child_0.ref();
this.el.set_image ( child_0.el );
// user defined functions
}
- public class Xcls_Image71 : Object
+ public class Xcls_Image53 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image71(Xcls_MainWindow _owner )
+ public Xcls_Image53(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// set gobject values
this.el.always_show_image = true;
this.el.label = "Errors";
- var child_0 = new Xcls_Image74( _this );
+ var child_0 = new Xcls_Image56( _this );
child_0.ref();
this.el.set_image ( child_0.el );
}
}
- public class Xcls_Image74 : Object
+ public class Xcls_Image56 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image74(Xcls_MainWindow _owner )
+ public Xcls_Image56(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// set gobject values
this.el.always_show_image = true;
this.el.label = "Warnings";
- var child_0 = new Xcls_Image76( _this );
+ var child_0 = new Xcls_Image58( _this );
child_0.ref();
this.el.set_image ( child_0.el );
}
}
- public class Xcls_Image76 : Object
+ public class Xcls_Image58 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image76(Xcls_MainWindow _owner )
+ public Xcls_Image58(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// set gobject values
this.el.always_show_image = true;
this.el.label = "Depricated";
- var child_0 = new Xcls_Image78( _this );
+ var child_0 = new Xcls_Image60( _this );
child_0.ref();
this.el.set_image ( child_0.el );
}
}
- public class Xcls_Image78 : Object
+ public class Xcls_Image60 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image78(Xcls_MainWindow _owner )
+ public Xcls_Image60(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
// set gobject values
this.el.always_show_image = true;
this.el.label = "Run";
- var child_0 = new Xcls_Image80( _this );
+ var child_0 = new Xcls_Image62( _this );
child_0.ref();
this.el.set_image ( child_0.el );
// user defined functions
}
- public class Xcls_Image80 : Object
+ public class Xcls_Image62 : Object
{
public Gtk.Image el;
private Xcls_MainWindow _this;
// my vars (def)
// ctor
- public Xcls_Image80(Xcls_MainWindow _owner )
+ public Xcls_Image62(Xcls_MainWindow _owner )
{
_this = _owner;
this.el = new Gtk.Image();
--- /dev/null
+{
+ "build_module" : "",
+ "items" : [
+ {
+ "# Gdk.Pixbuf missing_thumb_pixbuf" : "",
+ "# Project.Project selectedProject" : "",
+ "# Xcls_MainWindow win" : "",
+ "# bool is_loaded" : false,
+ "# bool is_loading" : false,
+ "$ xns" : "Gtk",
+ "Gtk.PositionType position" : "Gtk.PositionType.TOP",
+ "bool active" : false,
+ "bool hexpand" : false,
+ "bool modal" : true,
+ "id" : "PopoverFiles",
+ "int height_request" : 800,
+ "int width_request" : 900,
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "Gtk.ToolbarStyle toolbar_style" : "Gtk.ToolbarStyle.BOTH",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "listeners" : {
+ "clicked" : [
+ " ( ) => {",
+ " ",
+ " // create a new file in project..",
+ " //Xcls_DialogNewComponent.singleton().show(",
+ " var pe = EditProject.singleton();",
+ " //pe.el.set_transient_for(_this.el);",
+ " pe.el.set_modal(true); ",
+ " ",
+ " var p = pe.show();",
+ "",
+ " if (p == null) {",
+ " return;",
+ " }",
+ " ",
+ " /*",
+ " _this.win.windowstate.left_projects.is_loaded = false; ",
+ " _this.win.windowstate.left_projects.load();",
+ " _this.win.windowstate.left_projects.selectProject(p);",
+ " */",
+ " return ; ",
+ "",
+ "",
+ "}"
+ ]
+ },
+ "string icon_name" : "folder-new",
+ "string label" : "New Project",
+ "xtype" : "ToolButton"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "listeners" : {
+ "clicked" : [
+ " ( ) => {",
+ " // should disable the button really.",
+ " if (_this.selectedProject == null) {",
+ "\t return;",
+ " }",
+ "\t_this.win.windowstate.projectPopoverShow(this.el, _this.selectedProject);",
+ " }"
+ ]
+ },
+ "string icon_name" : "emblem-system",
+ "string label" : "Project Properties",
+ "xtype" : "ToolButton"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "listeners" : {
+ "clicked" : [
+ " ( ) => {",
+ " /*",
+ " var cd = DialogConfirm.singleton();",
+ " cd.el.set_transient_for(_this.el);",
+ " cd.el.set_modal(true);",
+ "",
+ " var project = _this.windowstate.left_projects.getSelectedProject();",
+ " if (project == null) {",
+ " print(\"SKIP - no project\\n\");",
+ " return;",
+ " }",
+ " ",
+ " ",
+ " if (Gtk.ResponseType.YES != cd.show(\"Confirm\", ",
+ " \"Are you sure you want to delete project %s\".printf(project.name))) {",
+ " return;",
+ " }",
+ " ",
+ "",
+ " // confirm?",
+ " Project.Project.remove(project);",
+ " _this.project = null;",
+ " ",
+ " _this.windowstate.left_projects.is_loaded = false;",
+ " _this.windowstate.left_projects.load();",
+ " _this.windowstate.clutterfiles.clearFiles();",
+ "*/",
+ "",
+ "}"
+ ]
+ },
+ "string icon_name" : "user-trash",
+ "string label" : "Delete Project",
+ "xtype" : "ToolButton"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "listeners" : {
+ "clicked" : [
+ " () => {",
+ " // create a new file in project..",
+ " print(\"add file selected\\n\");",
+ " ",
+ " if (_this.selectedProject == null) {",
+ " \treturn;",
+ " }",
+ " ",
+ " var f = JsRender.JsRender.factory(_this.selectedProject.xtype, _this.selectedProject, \"\");",
+ " _this.win.windowstate.file_details.show( f, this.el );",
+ "",
+ "}"
+ ]
+ },
+ "string icon_name" : "document-new",
+ "string label" : "New File",
+ "xtype" : "ToolButton"
+ }
+ ],
+ "xtype" : "Toolbar"
+ }
+ ],
+ "xtype" : "Box"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
+ "bool homogeneous" : false,
+ "items" : [
+ {
+ "$ shadow_type" : "Gtk.ShadowType.IN",
+ "$ xns" : "Gtk",
+ "* init" : [
+ " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
+ " "
+ ],
+ "* pack" : "add",
+ "bool expand" : true,
+ "int width_request" : 150,
+ "items" : [
+ {
+ "$ enable_tree_lines" : true,
+ "$ headers_visible" : true,
+ "$ xns" : "Gtk",
+ "* init" : [
+ " var description = new Pango.FontDescription();",
+ " description.set_size(9000);",
+ " this.el.override_font(description); ",
+ " ",
+ " var selection = this.el.get_selection();",
+ " selection.set_mode( Gtk.SelectionMode.SINGLE);",
+ " ",
+ "",
+ " ",
+ " ",
+ " "
+ ],
+ "* pack" : "add",
+ "id" : "view",
+ "items" : [
+ {
+ "$ columns" : "typeof(string), typeof(Object)",
+ "$ xns" : "Gtk",
+ "* init" : [
+ "{",
+ " this.el.set_sort_func(0, (mod,a,b) => {",
+ " GLib.Value ga, gb;",
+ " mod.get_value(a,0, out ga);",
+ " mod.get_value(b,0, out gb);",
+ " ",
+ " if ((string)ga == (string)gb) {",
+ " return 0;",
+ " }",
+ " return (string)ga > (string)gb ? 1 : -1;",
+ " }); ",
+ "",
+ "",
+ "}",
+ ""
+ ],
+ "* pack" : "set_model",
+ "id" : "model",
+ "n_columns" : 2,
+ "xtype" : "ListStore"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* init" : [
+ "",
+ " this.el.add_attribute(_this.namecol.el , \"markup\", 0 );",
+ " "
+ ],
+ "* pack" : "append_column",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,true",
+ "id" : "namecol",
+ "xtype" : "CellRendererText"
+ }
+ ],
+ "utf8 title" : "Projects",
+ "xtype" : "TreeViewColumn"
+ }
+ ],
+ "listeners" : {
+ "cursor_changed" : [
+ " () => {",
+ " if (_this.is_loading) {",
+ " return;",
+ " }",
+ " ",
+ " Gtk.TreeIter iter;",
+ " Gtk.TreeModel mod;",
+ " ",
+ " var s = this.el.get_selection();",
+ " if (!s.get_selected(out mod, out iter)) {",
+ " return;",
+ " }",
+ " ",
+ " GLib.Value gval;",
+ "",
+ " mod.get_value(iter, 1 , out gval);",
+ " var project = (Project.Project)gval.get_object();",
+ " ",
+ " _this.onProjectSelected(project);",
+ " ",
+ "} "
+ ]
+ },
+ "xtype" : "TreeView"
+ }
+ ],
+ "xtype" : "ScrolledWindow"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* init" : " this.el.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);",
+ "* pack" : "add",
+ "Gtk.ShadowType shadow_type" : "Gtk.ShadowType.IN",
+ "bool expand" : true,
+ "int width_request" : 600,
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* init" : [
+ "{",
+ "",
+ "}",
+ ""
+ ],
+ "* pack" : "add",
+ "id" : "iconview",
+ "int item_width" : 100,
+ "int markup_column" : 1,
+ "int pixbuf_column" : 3,
+ "items" : [
+ {
+ "$ columns" : "typeof(Object), typeof(string), typeof(string), typeof(Gdk.Pixbuf) ",
+ "$ xns" : "Gtk",
+ "* prop" : "model",
+ "id" : "iconmodel",
+ "int n_columns" : 4,
+ "xtype" : "ListStore"
+ }
+ ],
+ "listeners" : {
+ "item_activated" : [
+ "(path) => {",
+ "",
+ " \tGtk.TreeIter iter;",
+ " ",
+ " ",
+ "\tthis.el.model.get_iter(out iter, path);",
+ " ",
+ " GLib.Value gval;",
+ "",
+ " this.el.model.get_value(iter, 0 , out gval);",
+ " var file = (JsRender.JsRender)gval;",
+ " _this.win.windowstate.fileViewOpen(file);",
+ " _this.el.hide();",
+ " ",
+ " ",
+ "}"
+ ]
+ },
+ "xtype" : "IconView"
+ }
+ ],
+ "xtype" : "ScrolledWindow"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* init" : " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
+ "* pack" : "add",
+ "Gtk.ShadowType shadow_type" : "Gtk.ShadowType.IN",
+ "bool expand" : true,
+ "int width_request" : 100,
+ "items" : [
+ {
+ "$ enable_tree_lines" : true,
+ "$ headers_visible" : true,
+ "$ xns" : "Gtk",
+ "* init" : [
+ " var description = new Pango.FontDescription();",
+ " description.set_size(9000);",
+ " this.el.override_font(description); ",
+ " ",
+ " var selection = this.el.get_selection();",
+ " selection.set_mode( Gtk.SelectionMode.SINGLE);",
+ " ",
+ "",
+ " ",
+ " ",
+ " "
+ ],
+ "* pack" : "add",
+ "bool activate_on_single_click" : false,
+ "bool expand" : true,
+ "id" : "fileview",
+ "items" : [
+ {
+ "$ columns" : "typeof(string), typeof(string)",
+ "$ xns" : "Gtk",
+ "* init" : [
+ "{",
+ " this.el.set_sort_func(0, (mod,a,b) => {",
+ " GLib.Value ga, gb;",
+ " mod.get_value(a,0, out ga);",
+ " mod.get_value(b,0, out gb);",
+ " ",
+ " if ((string)ga == (string)gb) {",
+ " return 0;",
+ " }",
+ " return (string)ga > (string)gb ? 1 : -1;",
+ " }); ",
+ " ",
+ "",
+ "}",
+ ""
+ ],
+ "* pack" : "set_model",
+ "id" : "filemodel",
+ "n_columns" : 2,
+ "xtype" : "TreeStore"
+ },
+ {
+ "$ xns" : "Gtk",
+ "* init" : [
+ "",
+ " this.el.add_attribute(_this.filenamecol.el , \"markup\", 0 );",
+ " "
+ ],
+ "* pack" : "append_column",
+ "items" : [
+ {
+ "$ xns" : "Gtk",
+ "* pack" : "pack_start,true",
+ "id" : "filenamecol",
+ "xtype" : "CellRendererText"
+ }
+ ],
+ "utf8 title" : "File",
+ "xtype" : "TreeViewColumn"
+ }
+ ],
+ "listeners" : {
+ "cursor_changed" : [
+ " () => {",
+ " /*",
+ " if (_this.is_loading) {",
+ " return;",
+ " }",
+ " ",
+ " Gtk.TreeIter iter;",
+ " Gtk.TreeModel mod;",
+ " ",
+ " var s = this.el.get_selection();",
+ " if (!s.get_selected(out mod, out iter)) {",
+ " return;",
+ " }",
+ " ",
+ " GLib.Value gval;",
+ "",
+ " mod.get_value(iter, 1 , out gval);",
+ " var project = (Project.Project)gval.get_object();",
+ " ",
+ " _this.project_selected(project);",
+ " */",
+ "} "
+ ],
+ "row_activated" : [
+ "(path, col) => {",
+ "",
+ "\tGtk.TreeIter iter;",
+ " ",
+ " ",
+ "\tthis.el.model.get_iter(out iter, path);",
+ " ",
+ " GLib.Value gval;",
+ "",
+ " this.el.model.get_value(iter, 1 , out gval);",
+ " var fn = (string)gval;",
+ " if (fn.length < 1) {",
+ " \treturn;",
+ "\t}",
+ " ",
+ " ",
+ " var f = JsRender.JsRender.factory(\"PlainFile\", _this.selectedProject, fn);",
+ " ",
+ " _this.win.windowstate.fileViewOpen(f);",
+ " _this.el.hide();",
+ " ",
+ "}"
+ ]
+ },
+ "xtype" : "TreeView"
+ }
+ ],
+ "xtype" : "ScrolledWindow"
+ }
+ ],
+ "xtype" : "Box"
+ }
+ ],
+ "xtype" : "Box"
+ }
+ ],
+ "listeners" : {
+ "hide" : [
+ "( ) => {",
+ "\t// save...",
+ "\t//this.load();",
+ "\t//if (project != null) {",
+ "//\t\tthis.selectProject(project);",
+ "//\t}",
+ " \tif (_this.win.windowstate.project == null) {",
+ " \t\tthis.el.show();",
+ "\t}",
+ "}"
+ ]
+ },
+ "xtype" : "Popover",
+ "| void load" : [
+ "() {",
+ " // clear list...",
+ " ",
+ " if (_this.is_loaded) {",
+ " return;",
+ " }",
+ " _this.is_loading = true;",
+ " ",
+ " _this.is_loaded = true;",
+ " ",
+ " Project.Project.loadAll();",
+ " var projects = Project.Project.allProjectsByName();",
+ " ",
+ " Gtk.TreeIter iter;",
+ " var m = this.model.el;",
+ " m.clear();",
+ " ",
+ " for (var i = 0; i < projects.size; i++) {",
+ " m.append(out iter);",
+ " m.set(iter, 0,projects.get(i).name );",
+ " ",
+ " var o = GLib.Value(typeof(Object));",
+ " o.set_object((Object)projects.get(i));",
+ " ",
+ " m.set_value(iter, 1, o);",
+ " ",
+ " }",
+ " m.set_sort_column_id(0, Gtk.SortType.ASCENDING);",
+ " _this.is_loading = false; ",
+ "}",
+ ""
+ ],
+ "| void onProjectSelected" : [
+ "(Project.Project project) {",
+ "\tthis.selectedProject = project;",
+ "\tproject.scanDirs();",
+ "\t//this.clutterfiles.loadProject(proj);",
+ "\t",
+ "\t",
+ "\t ",
+ "",
+ " ",
+ " ",
+ " //this.project_title_name.el.text = pr.name;",
+ " //this.project_title_path.el.text = pr.firstPath();",
+ " ",
+ " // file items contains a reference until we reload ...",
+ " Gdk.Pixbuf pixbuf = null;",
+ "\t Gtk.TreeIter iter;",
+ " var m = this.iconmodel.el;",
+ " m.clear();",
+ " ",
+ " var fiter = project.sortedFiles().list_iterator();",
+ " while (fiter.next()) {",
+ " m.append(out iter);",
+ " var file = fiter.get();",
+ " m.set(iter, 0,file ); // zero contains the file reference",
+ " m.set(iter, 1,file.nickNameSplit() ); // marked up title?",
+ " m.set(iter, 2,file.nickType() ); // file type?",
+ " ",
+ " ",
+ " var fname = file.getIconFileName(false);",
+ " try {",
+ "\t\t if (FileUtils.test(fname, FileTest.EXISTS)) {",
+ "\t\t var npixbuf = new Gdk.Pixbuf.from_file(fname);",
+ "\t\t pixbuf = npixbuf.scale_simple(92, (int) (npixbuf.height * 92.0 /npixbuf.width * 1.0 )",
+ "\t\t\t\t , Gdk.InterpType.NEAREST) ;",
+ "\t\t } ",
+ "\t\t} catch (Error e) {",
+ "\t\t // noop",
+ "\t\t",
+ "\t\t}",
+ " if (pixbuf == null) {",
+ " ",
+ "\t\t try {",
+ "\t\t if (_this.missing_thumb_pixbuf == null) {",
+ "\t\t var icon_theme = Gtk.IconTheme.get_default ();",
+ "\t\t _this.missing_thumb_pixbuf = icon_theme.load_icon (\"package-x-generic\", 92, 0);",
+ "\t\t _this.missing_thumb_pixbuf.ref();",
+ "\t\t }",
+ "\t\t pixbuf = _this.missing_thumb_pixbuf;",
+ "",
+ "\t\t } catch (Error e) {",
+ "\t\t // noop?",
+ "\t\t }",
+ "\t\t}",
+ "\t\t",
+ "\t\t",
+ "\t\t",
+ " m.set(iter, 3,pixbuf);",
+ " ",
+ " // this needs to add to the iconview?",
+ " ",
+ " //var a = new Xcls_fileitem(this,fiter.get());",
+ " //this.fileitems.add(a);",
+ "",
+ " //this.filelayout.el.add_child(a.el);",
+ " }",
+ " ",
+ " ",
+ " ",
+ " ",
+ " // folders...",
+ " ",
+ " if (!(project is Project.Gtk)) {",
+ " print (\"not gtk... skipping files\");",
+ " return;",
+ " }",
+ " var gpr = (Project.Gtk)project;",
+ " var def = gpr.compilegroups.get(\"_default_\");",
+ " // not sure why the above is returng null!??",
+ " if (def == null) {",
+ " \t\tdef = new Project.GtkValaSettings(\"_default_\"); ",
+ " \t\tgpr.compilegroups.set(\"_default_\", def);",
+ " }",
+ "\t var items = def.sources;",
+ "\t\t ",
+ "\t Gtk.TreeIter citer; // folder iter",
+ "\t Gtk.TreeIter fxiter; // file iter",
+ "\tfor(var i =0 ; i < items.size; i++) {",
+ "\t print (\"cheking folder %s\\n\", items.get(i));",
+ "\t var files = gpr.filesForOpen(items.get(i));",
+ "\t if (files.size < 1) {",
+ "\t continue;",
+ "\t }",
+ "\t\t this.filemodel.el.append(out citer,null);",
+ "\t\t this.filemodel.el.set(citer, 0, GLib.Path.get_basename(items.get(i)));",
+ "\t\t this.filemodel.el.set(citer, 1, null); // parent (empty as it's a folder)",
+ "\t\t",
+ "\t\t",
+ "\t // add the directory... items.get(i);",
+ "\t //var x = new Xcls_folderitem(this,items.get(i));",
+ "\t //this.fileitems.add(x);",
+ "\t //this.filelayout.el.add_child(x.el);",
+ "\t ",
+ "\t ",
+ "\t for(var j =0 ; j < files.size; j++) {",
+ "\t ",
+ "\t\t this.filemodel.el.insert(out fxiter,citer, -1);",
+ "\t \tthis.filemodel.el.set(fxiter, 0, GLib.Path.get_basename(files.get(j))); // filename",
+ "\t\t \tthis.filemodel.el.set(fxiter, 1, files.get(j)); // Folder?",
+ "\t ",
+ "\t ",
+ "\t }",
+ "\t ",
+ "\t ",
+ "\t //this.el.set_value(citer, 1, items.get(i) );",
+ "\t}",
+ " _this.fileview.el.expand_all();",
+ " ",
+ "\t",
+ "}",
+ ""
+ ],
+ "| void selectProject" : [
+ "(Project.Project project) {",
+ " ",
+ " var sel = _this.view.el.get_selection();",
+ " ",
+ " sel.unselect_all();",
+ " ",
+ " var found = false;",
+ " _this.model.el.foreach((mod, path, iter) => {",
+ " GLib.Value val;",
+ " ",
+ " mod.get_value(iter, 1, out val);",
+ " if ( ( (Project.Project)val.get_object()).fn != project.fn) {",
+ " print(\"SKIP %s != %s\\n\", ((Project.Project)val.get_object()).name , project.name);",
+ " return false;//continue",
+ " }",
+ " sel.select_iter(iter);",
+ "\t\tthis.selectedProject = project;",
+ " this.onProjectSelected(project);",
+ " found = true;",
+ " return true;",
+ " ",
+ " ",
+ " });",
+ " if (!found) {",
+ "\t print(\"tried to select %s, could not find it\", project.name);",
+ " }",
+ "}",
+ ""
+ ],
+ "| void setMainWindow" : [
+ "(Xcls_MainWindow win) {",
+ "\tthis.win = win;",
+ "\t ",
+ "}",
+ ""
+ ],
+ "| void show" : [
+ "(Gtk.Widget on_el, Project.Project? project ) {",
+ "\t//this.editor.show( file, node, ptype, key);",
+ "\t",
+ "\t\t// save...",
+ "\tthis.load();",
+ "\tif (project != null) {",
+ "\t\tthis.selectProject(project);",
+ "\t}",
+ "\t",
+ "\t",
+ " int w,h;",
+ " this.win.el.get_size(out w, out h);",
+ " ",
+ " // left tree = 250, editor area = 500?",
+ " ",
+ " // min 450?",
+ "\t// max hieght ...",
+ "\t",
+ "\tvar ww = on_el.get_allocated_width();",
+ "\t",
+ "\t// width = should be max = w-ww , or 600 at best..?",
+ "\t ",
+ " this.el.set_size_request( w, h); // same as parent...",
+ "",
+ "",
+ "\tthis.el.set_modal(true);",
+ "\tthis.el.set_relative_to(on_el);",
+ "",
+ "\t//this.el.set_position(Gtk.PositionType.BOTTOM);",
+ "",
+ "\t// window + header?",
+ " ",
+ "\tthis.el.show_all();",
+ " //while(Gtk.events_pending()) { ",
+ " // Gtk.main_iteration(); // why?",
+ " //} ",
+ "",
+ "}",
+ ""
+ ]
+ }
+ ],
+ "modOrder" : "",
+ "name" : "PopoverFiles",
+ "parent" : "",
+ "path" : "/home/alan/gitlive/roobuilder/src/Builder4/PopoverFiles.bjs",
+ "permname" : "",
+ "title" : ""
+}
\ No newline at end of file
--- /dev/null
+static Xcls_PopoverFiles _PopoverFiles;
+
+public class Xcls_PopoverFiles : Object
+{
+ public Gtk.Popover el;
+ private Xcls_PopoverFiles _this;
+
+ public static Xcls_PopoverFiles singleton()
+ {
+ if (_PopoverFiles == null) {
+ _PopoverFiles= new Xcls_PopoverFiles();
+ }
+ return _PopoverFiles;
+ }
+ public Xcls_view view;
+ public Xcls_model model;
+ public Xcls_namecol namecol;
+ public Xcls_iconview iconview;
+ public Xcls_iconmodel iconmodel;
+ public Xcls_fileview fileview;
+ public Xcls_filemodel filemodel;
+ public Xcls_filenamecol filenamecol;
+
+ // my vars (def)
+ public Project.Project selectedProject;
+ public bool is_loaded;
+ public bool active;
+ public Xcls_MainWindow win;
+ public Gdk.Pixbuf missing_thumb_pixbuf;
+ public bool is_loading;
+
+ // ctor
+ public Xcls_PopoverFiles()
+ {
+ _this = this;
+ this.el = new Gtk.Popover( null );
+
+ // my vars (dec)
+ this.is_loaded = false;
+ this.active = false;
+ this.is_loading = false;
+
+ // set gobject values
+ this.el.width_request = 900;
+ this.el.height_request = 800;
+ this.el.hexpand = false;
+ this.el.modal = true;
+ this.el.position = Gtk.PositionType.TOP;
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ //listeners
+ this.el.hide.connect( ( ) => {
+ // save...
+ //this.load();
+ //if (project != null) {
+ // this.selectProject(project);
+ // }
+ if (_this.win.windowstate.project == null) {
+ this.el.show();
+ }
+ });
+ }
+
+ // user defined functions
+ public void show (Gtk.Widget on_el, Project.Project? project ) {
+ //this.editor.show( file, node, ptype, key);
+
+ // save...
+ this.load();
+ if (project != null) {
+ this.selectProject(project);
+ }
+
+
+ int w,h;
+ this.win.el.get_size(out w, out h);
+
+ // left tree = 250, editor area = 500?
+
+ // min 450?
+ // max hieght ...
+
+ var ww = on_el.get_allocated_width();
+
+ // width = should be max = w-ww , or 600 at best..?
+
+ this.el.set_size_request( w, h); // same as parent...
+
+
+ this.el.set_modal(true);
+ this.el.set_relative_to(on_el);
+
+ //this.el.set_position(Gtk.PositionType.BOTTOM);
+
+ // window + header?
+
+ this.el.show_all();
+ //while(Gtk.events_pending()) {
+ // Gtk.main_iteration(); // why?
+ //}
+
+ }
+ public void setMainWindow (Xcls_MainWindow win) {
+ this.win = win;
+
+ }
+ public void load () {
+ // clear list...
+
+ if (_this.is_loaded) {
+ return;
+ }
+ _this.is_loading = true;
+
+ _this.is_loaded = true;
+
+ Project.Project.loadAll();
+ var projects = Project.Project.allProjectsByName();
+
+ Gtk.TreeIter iter;
+ var m = this.model.el;
+ m.clear();
+
+ for (var i = 0; i < projects.size; i++) {
+ m.append(out iter);
+ m.set(iter, 0,projects.get(i).name );
+
+ var o = GLib.Value(typeof(Object));
+ o.set_object((Object)projects.get(i));
+
+ m.set_value(iter, 1, o);
+
+ }
+ m.set_sort_column_id(0, Gtk.SortType.ASCENDING);
+ _this.is_loading = false;
+ }
+ public void onProjectSelected (Project.Project project) {
+ this.selectedProject = project;
+ project.scanDirs();
+ //this.clutterfiles.loadProject(proj);
+
+
+
+
+
+
+ //this.project_title_name.el.text = pr.name;
+ //this.project_title_path.el.text = pr.firstPath();
+
+ // file items contains a reference until we reload ...
+ Gdk.Pixbuf pixbuf = null;
+ Gtk.TreeIter iter;
+ var m = this.iconmodel.el;
+ m.clear();
+
+ var fiter = project.sortedFiles().list_iterator();
+ while (fiter.next()) {
+ m.append(out iter);
+ var file = fiter.get();
+ m.set(iter, 0,file ); // zero contains the file reference
+ m.set(iter, 1,file.nickNameSplit() ); // marked up title?
+ m.set(iter, 2,file.nickType() ); // file type?
+
+
+ var fname = file.getIconFileName(false);
+ try {
+ if (FileUtils.test(fname, FileTest.EXISTS)) {
+ var npixbuf = new Gdk.Pixbuf.from_file(fname);
+ pixbuf = npixbuf.scale_simple(92, (int) (npixbuf.height * 92.0 /npixbuf.width * 1.0 )
+ , Gdk.InterpType.NEAREST) ;
+ }
+ } catch (Error e) {
+ // noop
+
+ }
+ if (pixbuf == null) {
+
+ try {
+ if (_this.missing_thumb_pixbuf == null) {
+ var icon_theme = Gtk.IconTheme.get_default ();
+ _this.missing_thumb_pixbuf = icon_theme.load_icon ("package-x-generic", 92, 0);
+ _this.missing_thumb_pixbuf.ref();
+ }
+ pixbuf = _this.missing_thumb_pixbuf;
+
+ } catch (Error e) {
+ // noop?
+ }
+ }
+
+
+
+ m.set(iter, 3,pixbuf);
+
+ // this needs to add to the iconview?
+
+ //var a = new Xcls_fileitem(this,fiter.get());
+ //this.fileitems.add(a);
+
+ //this.filelayout.el.add_child(a.el);
+ }
+
+
+
+
+ // folders...
+
+ if (!(project is Project.Gtk)) {
+ print ("not gtk... skipping files");
+ return;
+ }
+ var gpr = (Project.Gtk)project;
+ var def = gpr.compilegroups.get("_default_");
+ // not sure why the above is returng null!??
+ if (def == null) {
+ def = new Project.GtkValaSettings("_default_");
+ gpr.compilegroups.set("_default_", def);
+ }
+ var items = def.sources;
+
+ Gtk.TreeIter citer; // folder iter
+ Gtk.TreeIter fxiter; // file iter
+ for(var i =0 ; i < items.size; i++) {
+ print ("cheking folder %s\n", items.get(i));
+ var files = gpr.filesForOpen(items.get(i));
+ if (files.size < 1) {
+ continue;
+ }
+ this.filemodel.el.append(out citer,null);
+ this.filemodel.el.set(citer, 0, GLib.Path.get_basename(items.get(i)));
+ this.filemodel.el.set(citer, 1, null); // parent (empty as it's a folder)
+
+
+ // add the directory... items.get(i);
+ //var x = new Xcls_folderitem(this,items.get(i));
+ //this.fileitems.add(x);
+ //this.filelayout.el.add_child(x.el);
+
+
+ for(var j =0 ; j < files.size; j++) {
+
+ this.filemodel.el.insert(out fxiter,citer, -1);
+ this.filemodel.el.set(fxiter, 0, GLib.Path.get_basename(files.get(j))); // filename
+ this.filemodel.el.set(fxiter, 1, files.get(j)); // Folder?
+
+
+ }
+
+
+ //this.el.set_value(citer, 1, items.get(i) );
+ }
+ _this.fileview.el.expand_all();
+
+
+ }
+ public void selectProject (Project.Project project) {
+
+ var sel = _this.view.el.get_selection();
+
+ sel.unselect_all();
+
+ var found = false;
+ _this.model.el.foreach((mod, path, iter) => {
+ GLib.Value val;
+
+ mod.get_value(iter, 1, out val);
+ if ( ( (Project.Project)val.get_object()).fn != project.fn) {
+ print("SKIP %s != %s\n", ((Project.Project)val.get_object()).name , project.name);
+ return false;//continue
+ }
+ sel.select_iter(iter);
+ this.selectedProject = project;
+ this.onProjectSelected(project);
+ found = true;
+ return true;
+
+
+ });
+ if (!found) {
+ print("tried to select %s, could not find it", project.name);
+ }
+ }
+ public class Xcls_Box2 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box2(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Box3( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_Box9( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Box3 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box3(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_Toolbar4( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_Toolbar4 : Object
+ {
+ public Gtk.Toolbar el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Toolbar4(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Toolbar();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.toolbar_style = Gtk.ToolbarStyle.BOTH;
+ var child_0 = new Xcls_ToolButton5( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_ToolButton6( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_ToolButton7( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ var child_3 = new Xcls_ToolButton8( _this );
+ child_3.ref();
+ this.el.add ( child_3.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ToolButton5 : Object
+ {
+ public Gtk.ToolButton el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ToolButton5(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ToolButton( null, "New Project" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "folder-new";
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+
+ // create a new file in project..
+ //Xcls_DialogNewComponent.singleton().show(
+ var pe = EditProject.singleton();
+ //pe.el.set_transient_for(_this.el);
+ pe.el.set_modal(true);
+
+ var p = pe.show();
+
+ if (p == null) {
+ return;
+ }
+
+ /*
+ _this.win.windowstate.left_projects.is_loaded = false;
+ _this.win.windowstate.left_projects.load();
+ _this.win.windowstate.left_projects.selectProject(p);
+ */
+ return ;
+
+
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ToolButton6 : Object
+ {
+ public Gtk.ToolButton el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ToolButton6(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ToolButton( null, "Project Properties" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "emblem-system";
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+ // should disable the button really.
+ if (_this.selectedProject == null) {
+ return;
+ }
+ _this.win.windowstate.projectPopoverShow(this.el, _this.selectedProject);
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ToolButton7 : Object
+ {
+ public Gtk.ToolButton el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ToolButton7(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ToolButton( null, "Delete Project" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "user-trash";
+
+ //listeners
+ this.el.clicked.connect( ( ) => {
+ /*
+ var cd = DialogConfirm.singleton();
+ cd.el.set_transient_for(_this.el);
+ cd.el.set_modal(true);
+
+ var project = _this.windowstate.left_projects.getSelectedProject();
+ if (project == null) {
+ print("SKIP - no project\n");
+ return;
+ }
+
+
+ if (Gtk.ResponseType.YES != cd.show("Confirm",
+ "Are you sure you want to delete project %s".printf(project.name))) {
+ return;
+ }
+
+
+ // confirm?
+ Project.Project.remove(project);
+ _this.project = null;
+
+ _this.windowstate.left_projects.is_loaded = false;
+ _this.windowstate.left_projects.load();
+ _this.windowstate.clutterfiles.clearFiles();
+ */
+
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_ToolButton8 : Object
+ {
+ public Gtk.ToolButton el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ToolButton8(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ToolButton( null, "New File" );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.icon_name = "document-new";
+
+ //listeners
+ this.el.clicked.connect( () => {
+ // create a new file in project..
+ print("add file selected\n");
+
+ if (_this.selectedProject == null) {
+ return;
+ }
+
+ var f = JsRender.JsRender.factory(_this.selectedProject.xtype, _this.selectedProject, "");
+ _this.win.windowstate.file_details.show( f, this.el );
+
+ });
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_Box9 : Object
+ {
+ public Gtk.Box el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Box9(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Box( Gtk.Orientation.HORIZONTAL, 0 );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.homogeneous = false;
+ var child_0 = new Xcls_ScrolledWindow10( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_ScrolledWindow15( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_ScrolledWindow18( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_ScrolledWindow10 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow10(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 150;
+ this.el.expand = true;
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_view : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_view(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.view = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.enable_tree_lines = true;
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_model( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn13( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ // init method
+
+ var description = new Pango.FontDescription();
+ description.set_size(9000);
+ this.el.override_font(description);
+
+ var selection = this.el.get_selection();
+ selection.set_mode( Gtk.SelectionMode.SINGLE);
+
+ //listeners
+ this.el.cursor_changed.connect( () => {
+ if (_this.is_loading) {
+ return;
+ }
+
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+ var s = this.el.get_selection();
+ if (!s.get_selected(out mod, out iter)) {
+ return;
+ }
+
+ GLib.Value gval;
+
+ mod.get_value(iter, 1 , out gval);
+ var project = (Project.Project)gval.get_object();
+
+ _this.onProjectSelected(project);
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_model : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_model(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.model = this;
+ this.el = new Gtk.ListStore( 2, typeof(string), typeof(Object) );
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+ this.el.set_sort_func(0, (mod,a,b) => {
+ GLib.Value ga, gb;
+ mod.get_value(a,0, out ga);
+ mod.get_value(b,0, out gb);
+
+ if ((string)ga == (string)gb) {
+ return 0;
+ }
+ return (string)ga > (string)gb ? 1 : -1;
+ });
+
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_TreeViewColumn13 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn13(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "Projects";
+ var child_0 = new Xcls_namecol( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ this.el.add_attribute(_this.namecol.el , "markup", 0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_namecol : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_namecol(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.namecol = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+
+ public class Xcls_ScrolledWindow15 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow15(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 600;
+ this.el.expand = true;
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_iconview( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_iconview : Object
+ {
+ public Gtk.IconView el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_iconview(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.iconview = this;
+ this.el = new Gtk.IconView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.markup_column = 1;
+ this.el.pixbuf_column = 3;
+ this.el.item_width = 100;
+ var child_0 = new Xcls_iconmodel( _this );
+ child_0.ref();
+ this.el.model = child_0.el;
+
+ // init method
+
+ {
+
+ }
+
+ //listeners
+ this.el.item_activated.connect( (path) => {
+
+ Gtk.TreeIter iter;
+
+
+ this.el.model.get_iter(out iter, path);
+
+ GLib.Value gval;
+
+ this.el.model.get_value(iter, 0 , out gval);
+ var file = (JsRender.JsRender)gval;
+ _this.win.windowstate.fileViewOpen(file);
+ _this.el.hide();
+
+
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_iconmodel : Object
+ {
+ public Gtk.ListStore el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_iconmodel(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.iconmodel = this;
+ this.el = new Gtk.ListStore( 4, typeof(Object), typeof(string), typeof(string), typeof(Gdk.Pixbuf) );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+ public class Xcls_ScrolledWindow18 : Object
+ {
+ public Gtk.ScrolledWindow el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow18(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.ScrolledWindow( null, null );
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.width_request = 100;
+ this.el.expand = true;
+ this.el.shadow_type = Gtk.ShadowType.IN;
+ var child_0 = new Xcls_fileview( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+
+ // init method
+
+ this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
+ }
+
+ // user defined functions
+ }
+ public class Xcls_fileview : Object
+ {
+ public Gtk.TreeView el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_fileview(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.fileview = this;
+ this.el = new Gtk.TreeView();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.activate_on_single_click = false;
+ this.el.expand = true;
+ this.el.enable_tree_lines = true;
+ this.el.headers_visible = true;
+ var child_0 = new Xcls_filemodel( _this );
+ child_0.ref();
+ this.el.set_model ( child_0.el );
+ var child_1 = new Xcls_TreeViewColumn21( _this );
+ child_1.ref();
+ this.el.append_column ( child_1.el );
+
+ // init method
+
+ var description = new Pango.FontDescription();
+ description.set_size(9000);
+ this.el.override_font(description);
+
+ var selection = this.el.get_selection();
+ selection.set_mode( Gtk.SelectionMode.SINGLE);
+
+ //listeners
+ this.el.row_activated.connect( (path, col) => {
+
+ Gtk.TreeIter iter;
+
+
+ this.el.model.get_iter(out iter, path);
+
+ GLib.Value gval;
+
+ this.el.model.get_value(iter, 1 , out gval);
+ var fn = (string)gval;
+ if (fn.length < 1) {
+ return;
+ }
+
+
+ var f = JsRender.JsRender.factory("PlainFile", _this.selectedProject, fn);
+
+ _this.win.windowstate.fileViewOpen(f);
+ _this.el.hide();
+
+ });
+ this.el.cursor_changed.connect( () => {
+ /*
+ if (_this.is_loading) {
+ return;
+ }
+
+ Gtk.TreeIter iter;
+ Gtk.TreeModel mod;
+
+ var s = this.el.get_selection();
+ if (!s.get_selected(out mod, out iter)) {
+ return;
+ }
+
+ GLib.Value gval;
+
+ mod.get_value(iter, 1 , out gval);
+ var project = (Project.Project)gval.get_object();
+
+ _this.project_selected(project);
+ */
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_filemodel : Object
+ {
+ public Gtk.TreeStore el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_filemodel(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.filemodel = this;
+ this.el = new Gtk.TreeStore( 2, typeof(string), typeof(string) );
+
+ // my vars (dec)
+
+ // set gobject values
+
+ // init method
+
+ {
+ this.el.set_sort_func(0, (mod,a,b) => {
+ GLib.Value ga, gb;
+ mod.get_value(a,0, out ga);
+ mod.get_value(b,0, out gb);
+
+ if ((string)ga == (string)gb) {
+ return 0;
+ }
+ return (string)ga > (string)gb ? 1 : -1;
+ });
+
+
+ }
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_TreeViewColumn21 : Object
+ {
+ public Gtk.TreeViewColumn el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_TreeViewColumn21(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.TreeViewColumn();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.title = "File";
+ var child_0 = new Xcls_filenamecol( _this );
+ child_0.ref();
+ this.el.pack_start ( child_0.el , true );
+
+ // init method
+
+ this.el.add_attribute(_this.filenamecol.el , "markup", 0 );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_filenamecol : Object
+ {
+ public Gtk.CellRendererText el;
+ private Xcls_PopoverFiles _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_filenamecol(Xcls_PopoverFiles _owner )
+ {
+ _this = _owner;
+ _this.filenamecol = this;
+ this.el = new Gtk.CellRendererText();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+
+
+
+
+
+
+}
{
- "name" : "WindowLeftProjects",
- "parent" : "",
- "title" : "",
- "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/WindowLeftProjects.bjs",
- "permname" : "",
- "modOrder" : "",
"build_module" : "builder",
"items" : [
{
- "listeners" : {
- "show" : " ( ) => {\n this.load();\n}"
- },
- "@ void project_selected" : "(Project.Project project)",
- "id" : "WindowLeftProjects",
- "| void load" : "() {\n // clear list...\n \n if (_this.is_loaded) {\n return;\n }\n _this.is_loading = true;\n \n _this.is_loaded = true;\n \n Project.Project.loadAll();\n var projects = Project.Project.allProjectsByName();\n \n Gtk.TreeIter iter;\n var m = this.model.el;\n m.clear();\n \n for (var i = 0; i < projects.size; i++) {\n m.append(out iter);\n m.set(iter, 0,projects.get(i).name );\n \n var o = GLib.Value(typeof(Object));\n o.set_object((Object)projects.get(i));\n \n m.set_value(iter, 1, o);\n \n }\n m.set_sort_column_id(0, Gtk.SortType.ASCENDING);\n _this.is_loading = false; \n}\n",
"# bool is_loaded" : false,
- "* pack" : "add",
- "xtype" : "Box",
- "| Project.Project? getSelectedProject" : "() { \n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n \n var s = this.view.el.get_selection();\n if (!s.get_selected(out mod, out iter)) {\n return null;\n }\n \n GLib.Value gval;\n\n mod.get_value(iter, 1 , out gval);\n var project = (Project.Project)gval.get_object();\n \n return project;\n}",
- "| void selectProject" : "(Project.Project project) {\n \n var sel = _this.view.el.get_selection();\n \n sel.unselect_all();\n \n var found = false;\n _this.model.el.foreach((mod, path, iter) => {\n GLib.Value val;\n \n mod.get_value(iter, 1, out val);\n if ( ( (Project.Project)val.get_object()).fn != project.fn) {\n print(\"SKIP %s != %s\\n\", ((Project.Project)val.get_object()).name , project.name);\n return false;//continue\n }\n sel.select_iter(iter);\n this.project_selected(project);\n found = true;\n return true;\n \n \n });\n if (!found) {\n\t print(\"tried to select %s, could not find it\", project.name);\n }\n}\n",
"# bool is_loading" : false,
- "$ xns" : "Gtk",
- "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"$ homogeneous" : false,
+ "$ xns" : "Gtk",
+ "* pack" : "add",
+ "@ void project_selectedx" : "(Project.Project project)",
"@ void show_new_project" : "()",
+ "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+ "id" : "WindowLeftProjects",
"items" : [
{
- "* init" : " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n",
"$ shadow_type" : "Gtk.ShadowType.IN",
- "* pack" : "pack_end,true,true,0",
- "xtype" : "ScrolledWindow",
"$ xns" : "Gtk",
+ "* init" : [
+ " this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);",
+ ""
+ ],
+ "* pack" : "pack_end,true,true,0",
"items" : [
{
- "listeners" : {
- "cursor_changed" : " () => {\n if (_this.is_loading) {\n return;\n }\n \n Gtk.TreeIter iter;\n Gtk.TreeModel mod;\n \n var s = this.el.get_selection();\n if (!s.get_selected(out mod, out iter)) {\n return;\n }\n \n GLib.Value gval;\n\n mod.get_value(iter, 1 , out gval);\n var project = (Project.Project)gval.get_object();\n \n _this.project_selected(project);\n \n} "
- },
- "id" : "view",
- "* init" : " var description = new Pango.FontDescription();\n description.set_size(8000);\n this.el.override_font(description); \n \n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n \n\n \n \n ",
- "xtype" : "TreeView",
- "* pack" : "add",
"$ enable_tree_lines" : true,
"$ headers_visible" : true,
"$ xns" : "Gtk",
+ "* init" : [
+ " var description = new Pango.FontDescription();",
+ " description.set_size(8000);",
+ " this.el.override_font(description); ",
+ " ",
+ " var selection = this.el.get_selection();",
+ " selection.set_mode( Gtk.SelectionMode.SINGLE);",
+ " ",
+ "",
+ " ",
+ " ",
+ " "
+ ],
+ "* pack" : "add",
+ "id" : "view",
"items" : [
{
- "id" : "model",
- "* init" : "{\n this.el.set_sort_func(0, (mod,a,b) => {\n GLib.Value ga, gb;\n mod.get_value(a,0, out ga);\n mod.get_value(b,0, out gb);\n \n if ((string)ga == (string)gb) {\n return 0;\n }\n return (string)ga > (string)gb ? 1 : -1;\n }); \n\n\n}\n",
- "* pack" : "set_model",
- "xtype" : "ListStore",
"$ columns" : "typeof(string), typeof(Object)",
+ "$ xns" : "Gtk",
+ "* init" : [
+ "{",
+ " this.el.set_sort_func(0, (mod,a,b) => {",
+ " GLib.Value ga, gb;",
+ " mod.get_value(a,0, out ga);",
+ " mod.get_value(b,0, out gb);",
+ " ",
+ " if ((string)ga == (string)gb) {",
+ " return 0;",
+ " }",
+ " return (string)ga > (string)gb ? 1 : -1;",
+ " }); ",
+ "",
+ "",
+ "}",
+ ""
+ ],
+ "* pack" : "set_model",
+ "id" : "model",
"n_columns" : 2,
- "$ xns" : "Gtk"
+ "xtype" : "ListStore"
},
{
- "utf8 title" : "Projects",
- "* init" : "\n this.el.add_attribute(_this.namecol.el , \"markup\", 0 );\n ",
- "* pack" : "append_column",
- "xtype" : "TreeViewColumn",
"$ xns" : "Gtk",
+ "* init" : [
+ "",
+ " this.el.add_attribute(_this.namecol.el , \"markup\", 0 );",
+ " "
+ ],
+ "* pack" : "append_column",
"items" : [
{
- "id" : "namecol",
+ "$ xns" : "Gtk",
"* pack" : "pack_start,true",
- "xtype" : "CellRendererText",
- "$ xns" : "Gtk"
+ "id" : "namecol",
+ "xtype" : "CellRendererText"
}
- ]
+ ],
+ "utf8 title" : "Projects",
+ "xtype" : "TreeViewColumn"
}
- ]
+ ],
+ "listeners" : {
+ "cursor_changed" : [
+ " () => {",
+ " if (_this.is_loading) {",
+ " return;",
+ " }",
+ " ",
+ " Gtk.TreeIter iter;",
+ " Gtk.TreeModel mod;",
+ " ",
+ " var s = this.el.get_selection();",
+ " if (!s.get_selected(out mod, out iter)) {",
+ " return;",
+ " }",
+ " ",
+ " GLib.Value gval;",
+ "",
+ " mod.get_value(iter, 1 , out gval);",
+ " var project = (Project.Project)gval.get_object();",
+ " ",
+ " _this.project_selected(project);",
+ " ",
+ "} "
+ ]
+ },
+ "xtype" : "TreeView"
}
- ]
+ ],
+ "xtype" : "ScrolledWindow"
}
+ ],
+ "listeners" : {
+ "show" : [
+ " ( ) => {",
+ " this.load(); ",
+ "}"
+ ]
+ },
+ "xtype" : "Box",
+ "| Project.Project? getSelectedProject" : [
+ "() { ",
+ " Gtk.TreeIter iter;",
+ " Gtk.TreeModel mod;",
+ " ",
+ " var s = this.view.el.get_selection();",
+ " if (!s.get_selected(out mod, out iter)) {",
+ " return null;",
+ " }",
+ " ",
+ " GLib.Value gval;",
+ "",
+ " mod.get_value(iter, 1 , out gval);",
+ " var project = (Project.Project)gval.get_object();",
+ " ",
+ " return project;",
+ "}"
+ ],
+ "| void load" : [
+ "() {",
+ " // clear list...",
+ " ",
+ " if (_this.is_loaded) {",
+ " return;",
+ " }",
+ " _this.is_loading = true;",
+ " ",
+ " _this.is_loaded = true;",
+ " ",
+ " Project.Project.loadAll();",
+ " var projects = Project.Project.allProjectsByName();",
+ " ",
+ " Gtk.TreeIter iter;",
+ " var m = this.model.el;",
+ " m.clear();",
+ " ",
+ " for (var i = 0; i < projects.size; i++) {",
+ " m.append(out iter);",
+ " m.set(iter, 0,projects.get(i).name );",
+ " ",
+ " var o = GLib.Value(typeof(Object));",
+ " o.set_object((Object)projects.get(i));",
+ " ",
+ " m.set_value(iter, 1, o);",
+ " ",
+ " }",
+ " m.set_sort_column_id(0, Gtk.SortType.ASCENDING);",
+ " _this.is_loading = false; ",
+ "}",
+ ""
+ ],
+ "| void selectProject" : [
+ "(Project.Project project) {",
+ " ",
+ " var sel = _this.view.el.get_selection();",
+ " ",
+ " sel.unselect_all();",
+ " ",
+ " var found = false;",
+ " _this.model.el.foreach((mod, path, iter) => {",
+ " GLib.Value val;",
+ " ",
+ " mod.get_value(iter, 1, out val);",
+ " if ( ( (Project.Project)val.get_object()).fn != project.fn) {",
+ " print(\"SKIP %s != %s\\n\", ((Project.Project)val.get_object()).name , project.name);",
+ " return false;//continue",
+ " }",
+ " sel.select_iter(iter);",
+ " this.project_selected(project);",
+ " found = true;",
+ " return true;",
+ " ",
+ " ",
+ " });",
+ " if (!found) {",
+ "\t print(\"tried to select %s, could not find it\", project.name);",
+ " }",
+ "}",
+ ""
]
}
- ]
+ ],
+ "modOrder" : "",
+ "name" : "WindowLeftProjects",
+ "parent" : "",
+ "path" : "/home/alan/gitlive/roobuilder/src/Builder4/WindowLeftProjects.bjs",
+ "permname" : "",
+ "title" : ""
}
\ No newline at end of file
public Xcls_namecol namecol;
// my vars (def)
- public signal void project_selected (Project.Project project);
+ public signal void project_selectedx (Project.Project project);
public bool is_loaded;
public bool is_loading;
public signal void show_new_project ();
//listeners
this.el.show.connect( ( ) => {
- this.load();
+ this.load();
});
}
}
m.set_sort_column_id(0, Gtk.SortType.ASCENDING);
- _this.is_loading = false;
+ _this.is_loading = false;
}
public Project.Project? getSelectedProject () {
Gtk.TreeIter iter;
//PROP,
//LISTENER,
//CODE, // code editor.
- CODEONLY,
- FILES //,
-
-
- }
+ CODEONLY //,
+ //FILES //,
+
+ }
public State state = State.NONE;
public Editor code_editor_tab;
public Xcls_WindowRooView window_rooview;
public Xcls_GtkView window_gladeview;
+ public Xcls_PopoverFiles popover_files;
- public Xcls_ClutterFiles clutterfiles;
-
- public Xcls_WindowLeftProjects left_projects; // can not see where this is initialized..
-
+ //public Xcls_ClutterFiles clutterfiles;
+ //public Xcls_WindowLeftProjects left_projects; // can not see where this is initialized..
+
public DialogTemplateSelect template_select;
public Xcls_PopoverFileDetails file_details;
this.projectEditInit();
this.codeEditInit();
this.codePopoverEditInit();
- this.projectListInit();
- this.fileViewInit();
+ //this.projectListInit();
+ //this.fileViewInit();
// adding stuff
this.objectAddInit();
this.win.statusbar_compilestatus_label.el.hide();
this.win.statusbar_run.el.hide();
this.win.search_results.el.hide();
+
+ this.popover_files = new Xcls_PopoverFiles();
+ this.popover_files.setMainWindow(this.win);
}
});
}
- public void projectPopoverShow(Gtk.Widget btn)
- {
- var xtype = "";
- var pr = this.project;
+ public void projectPopoverShow(Gtk.Widget btn, Project.Project? pr)
+ {
+ if (pr == null) {
+ pr = this.project;
+ }
+
+ /*
var active_file = this.left_tree.getActiveFile() ;
if (active_file != null) {
xtype = active_file.xtype;
} else {
+
+ return; // no active project
// we might be on the file brower..
- pr = this.left_projects.getSelectedProject();
- if (pr != null) {
- xtype = pr.xtype;
- }
- }
- if (xtype == "") {
+ //pr = this.left_projects.getSelectedProject();
+ //if (pr != null) {
+ // xtype = pr.xtype;
+ //}
+ }
+ */
+ if (pr.xtype == "") {
return;
}
- if (xtype == "Roo" ) {
+ if (pr.xtype == "Roo" ) {
this.roo_projectsettings_pop.show(btn,pr);
return;
}
}
// ----------- list of projects on left
+ /*
public void projectListInit()
{
});
}
+ */
+
+
// ----------- file view
-
+ public void showPopoverFiles(Gtk.Widget btn, Project.Project? project)
+ {
+ this.popover_files.show(btn, project);
+
+ }
+
+
+/*
public void fileViewInit()
{
var stage = this.win.rooview.el.get_stage(); // seems odd...
});
}
+ */
public void fileDetailsInit()
{
this.win.codeeditview.el.save_easing_state();
this.win.objectview.el.save_easing_state();
this.win.rooview.el.save_easing_state();
- this.clutterfiles.el.save_easing_state();
+ // this.clutterfiles.el.save_easing_state();
}
public void easingRestoreAll()
this.win.codeeditview.el.restore_easing_state();
this.win.objectview.el.restore_easing_state();
this.win.rooview.el.restore_easing_state();
- this.clutterfiles.el.restore_easing_state();
+ //this.clutterfiles.el.restore_easing_state();
}
btn
);
}
+ public void showFilesPopover(Gtk.Widget btn)
+ {
+ this.popover_files.el.show_all();
+ this.popover_files.show(btn, this.win.project);
-
-
+ }
+
public void switchState(State new_state)
{
// stop werid stuff happening
- if (this.state == State.FILES
+ //if (this.state == State.FILES
//&& new_state == State.FILEPROJECT
- && this.left_projects.getSelectedProject() == null) {
- return;
- }
+ // && this.left_projects.getSelectedProject() == null) {
+ // return;
+ //}
// save the easing state of everything..
this.easingSaveAll();
break;
-
+ /*
case State.FILES: // goes to preview or codeonly...
// hide files...
break;
-
+ */
}
this.win.editpane.el.show(); // holder for tree and properties..
- this.left_projects.el.hide();
- if (oldstate != State.FILES) {
+ // this.left_projects.el.hide();
+ // if (oldstate != State.FILES) {
// it's handled above..
- print ("changing state to preview from NOT files..");
+ // print ("changing state to preview from NOT files..");
this.win.rooview.el.set_scale(1.0f,1.0f);
- }
+ // }
break;
-
-
-
+
case State.CODEONLY:
// going to codeonly..
this.win.codeeditview.el.show();
this.win.codeeditview.el.set_scale(1.0f,1.0f);
this.win.rooview.el.set_pivot_point(1.0f,0.5f);
break;
-
+/*
case State.FILES: // can only get here from PREVIEW (or code-only) state.. in theory..
break;
-
+*/
}
this.resizeCanvasElements();
this.win.rooview.el.set_size(alloc.width-50, alloc.height);
break;
- case State.FILES:
- this.clutterfiles.set_size(alloc.width-50, alloc.height);
- break;
+ //case State.FILES:
+ //this.clutterfiles.set_size(alloc.width-50, alloc.height);
+ // break;
// basically hide everything, then show the relivant..
// top bar btns
- this.win.openbtn.el.hide();
- this.win.openbackbtn.el.hide();
+ //this.win.openbtn.el.hide();
+ //this.win.openbackbtn.el.hide();
- this.win.backbutton.el.hide();
+ //this.win.backbutton.el.hide();
- this.win.editfilebutton.el.hide();
- this.win.projecteditbutton.el.hide();
this.win.objectshowbutton.el.hide(); // add objects
- this.win.addprojectbutton.el.hide();
- this.win.addfilebutton.el.hide();
- this.win.delprojectbutton.el.hide();
-
this.win.search_entry.el.hide();
this.win.search_results.el.hide();
switch (this.state) {
case State.PREVIEW: // this is the default state when working...
-
- this.win.editfilebutton.el.show();
- this.win.projecteditbutton.el.show();
this.win.addlistenerbutton.el.show();
this.win.search_entry.el.show();
- this.win.openbtn.el.show();
+ // this.win.openbtn.el.show();
break;
case State.CODEONLY:
- this.win.openbtn.el.show();
- this.win.projecteditbutton.el.show();
+ // this.win.openbtn.el.show();
this.win.search_entry.el.show();
break;
-
+ /*
case State.FILES:
if (this.left_projects.getSelectedProject() != null ) {
if (this.left_tree.getActiveFile() != null) {
break;
+ */
}
"../Builder4/MainWindow.vala",
"../Builder4/RooProjectProperties.vala",
"../Builder4/StandardErrorDialog.vala",
- "../Builder4/WindowLeftProjects.vala",
"../Builder4/WindowLeftProps.vala",
"../Builder4/WindowLeftTree.vala",
"../Builder4/WindowRooView.vala",
"../Builder4/PopoverAddProp.vala",
"../Builder4/PopoverAddObject.vala",
"../Builder4/PopoverEditor.vala",
- "../Builder4/Editor.vala"
+ "../Builder4/Editor.vala",
+ "../Builder4/PopoverFiles.vala"
],
"packages" : []
},
w.el.show_all();
// it looks like showall after children causes segfault on ubuntu 14.4
w.initChildren();
- w.windowstate.switchState(WindowState.State.FILES);
+ w.windowstate.showPopoverFiles(w.open_projects_btn.el, null);
+// w.windowstate.switchState(WindowState.State.FILES);
Gtk.main();
Builder4/EditProject.vala \
Builder4/Editor.vala \
Builder4/PopoverEditor.vala \
+ Builder4/PopoverFiles.vala \
Builder4/RooProjectSettings.vala \
Builder4/PopoverAddObject.vala \
Builder4/WindowLeftTree.vala \
Builder4/WindowRooView.vala \
Builder4/WindowLeftProps.vala \
Builder4/ClutterFiles.vala \
- Builder4/WindowLeftProjects.vala \
Builder4/PopoverAddProp.vala \
Builder4/GtkView.vala \
Builder4/ValaProjectSettingsPopover.vala \