src/Builder4/MainWindow.vala
"items" : [
{
"id" : "headerbar",
"items" : [
{
"id" : "headerbar",
"* pack" : "set_titlebar",
"* pack" : "set_titlebar",
"bool show_close_button" : true,
"$ xns" : "Gtk",
"string title" : "Application Builder",
"bool show_close_button" : true,
"$ xns" : "Gtk",
"string title" : "Application Builder",
"items" : [
{
"bool use_popover" : false,
"items" : [
{
"bool use_popover" : false,
- "xtype" : "MenuButton",
+ "xtype" : "MenuButton",
"$ xns" : "Gtk",
"items" : [
{
"$ xns" : "Gtk",
"items" : [
{
"listeners" : {
"activate" : " ( ) => {\n Xcls_MainWindow.singleton().no_windows++;\n var w = new Xcls_MainWindow();\n w.ref();\n\n w.el.show_all();\n w.initChildren();\n w.windowstate.switchState(WindowState.State.FILES);\n}"
},
"listeners" : {
"activate" : " ( ) => {\n Xcls_MainWindow.singleton().no_windows++;\n var w = new Xcls_MainWindow();\n w.ref();\n\n w.el.show_all();\n w.initChildren();\n w.windowstate.switchState(WindowState.State.FILES);\n}"
},
+ "string label" : "Open a new Window",
"* pack" : "append",
"xtype" : "MenuItem",
"* pack" : "append",
"xtype" : "MenuItem",
- "string label" : "Open a new Window",
"listeners" : {
"activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
},
"listeners" : {
"activate" : " ( ) => {\n Resources.singleton().fetchStart();\n}"
},
"string label" : "Download updated Resources",
"* pack" : "append",
"string label" : "Download updated Resources",
"* pack" : "append",
"$ xns" : "Gtk"
},
{
"listeners" : {
"activate" : "() => {\n About.singleton().el.show();\n }"
},
"$ xns" : "Gtk"
},
{
"listeners" : {
"activate" : "() => {\n About.singleton().el.show();\n }"
},
"xtype" : "MenuItem",
"string label" : "About the Builder",
"xtype" : "MenuItem",
"string label" : "About the Builder",
+ "utf8 icon_name" : "help-about",
"* pack" : "set_image",
"xtype" : "Image",
"* pack" : "set_image",
"xtype" : "Image",
- "utf8 icon_name" : "help-about",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"$ homogeneous" : false,
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"$ homogeneous" : false,
"items" : [
{
"id" : "leftpane",
"items" : [
{
"id" : "leftpane",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
{
"id" : "editpane",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
{
"id" : "editpane",
"* pack" : "pack_start,true,true,0",
"* pack" : "pack_start,true,true,0",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
{
"id" : "tree",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
"items" : [
{
"id" : "tree",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
},
{
"id" : "props",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
},
{
"id" : "props",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
}
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
}
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
},
"utf8 tooltip_text" : "Back",
"clicked" : " ( ) => {\n \n _this.windowstate.switchState(WindowState.State.PREVIEW);\n \n\n}"
},
"utf8 tooltip_text" : "Back",
"width_request" : 50,
"$ xns" : "Gtk",
"height_request" : 50,
"items" : [
{
"width_request" : 50,
"$ xns" : "Gtk",
"height_request" : 50,
"items" : [
{
"utf8 icon_name" : "go-previous",
"* pack" : "set_image",
"utf8 icon_name" : "go-previous",
"* pack" : "set_image",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"$ tooltop_text" : "\"Open File\"",
"items" : [
{
"$ tooltop_text" : "\"Open File\"",
"items" : [
{
+ "* pack" : "set_image",
"xtype" : "Image",
"utf8 icon_name" : "document-open",
"xtype" : "Image",
"utf8 icon_name" : "document-open",
- "* pack" : "set_image",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
+ "utf8 icon_name" : "document-properties",
"* pack" : "set_image",
"xtype" : "Image",
"* pack" : "set_image",
"xtype" : "Image",
- "utf8 icon_name" : "document-properties",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
"utf8 icon_name" : "emblem-system",
"* pack" : "set_image",
"utf8 icon_name" : "emblem-system",
"* pack" : "set_image",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
+ "* pack" : "set_image",
"xtype" : "Image",
"utf8 icon_name" : "list-add",
"xtype" : "Image",
"utf8 icon_name" : "list-add",
- "* pack" : "set_image",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
+ "utf8 icon_name" : "format-justify-left",
"* pack" : "set_image",
"xtype" : "Image",
"* pack" : "set_image",
"xtype" : "Image",
- "utf8 icon_name" : "format-justify-left",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
"utf8 icon_name" : "appointment-new",
"* pack" : "set_image",
"utf8 icon_name" : "appointment-new",
"* pack" : "set_image",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
+ "utf8 icon_name" : "folder-new",
"* pack" : "set_image",
"xtype" : "Image",
"* pack" : "set_image",
"xtype" : "Image",
- "utf8 icon_name" : "folder-new",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
+ "* pack" : "set_image",
"xtype" : "Image",
"utf8 icon_name" : "document-new",
"xtype" : "Image",
"utf8 icon_name" : "document-new",
- "* pack" : "set_image",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
"items" : [
{
"* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
- "* pack" : "add_child",
+ "* pack" : "add_child",
"$ xns" : "GtkClutter",
"items" : [
{
"$ xns" : "GtkClutter",
"items" : [
{
"height_request" : 50,
"items" : [
{
"height_request" : 50,
"items" : [
{
+ "utf8 icon_name" : "user-trash",
"* pack" : "set_image",
"xtype" : "Image",
"* pack" : "set_image",
"xtype" : "Image",
- "utf8 icon_name" : "user-trash",
},
{
"bool homogeneous" : false,
},
{
"bool homogeneous" : false,
"* pack" : "pack_end,false,true,0",
"* pack" : "pack_end,false,true,0",
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"items" : [
{
"$ xns" : "Gtk",
"Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
"items" : [
{
+ "* pack" : "pack_start,true,true,0",
"xtype" : "Label",
"string label" : " ",
"xtype" : "Label",
"string label" : " ",
- "* pack" : "pack_start,true,true,0",
"$ xns" : "Gtk"
},
{
"bool show_text" : true,
"$ xns" : "Gtk"
},
{
"bool show_text" : true,
"ulong handler_id" : "-1",
"ulong handler_id" : "-1",
"* init" : "{\n this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {\n if (pos < 1) {\n this.el.hide();\n _this.mainpane.el.set_sensitive(true);\n \n return;\n }\n _this.mainpane.el.set_sensitive(false);\n this.el.show();\n this.el.set_fraction ((1.0f * pos) / (1.0f * total));\n this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));\n \n });\n}\n",
"xtype" : "ProgressBar",
"* pack" : "pack_start,true,true,0",
"* init" : "{\n this.handler_id = Resources.singleton().updateProgress.connect((pos,total) => {\n if (pos < 1) {\n this.el.hide();\n _this.mainpane.el.set_sensitive(true);\n \n return;\n }\n _this.mainpane.el.set_sensitive(false);\n this.el.show();\n this.el.set_fraction ((1.0f * pos) / (1.0f * total));\n this.el.set_text(\"Fetching Resource : %s/%s\".printf(pos.to_string(), total.to_string()));\n \n });\n}\n",
"xtype" : "ProgressBar",
"* pack" : "pack_start,true,true,0",
"id" : "search_entry",
"* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
"* pack" : "pack_start,false,true,0",
"id" : "search_entry",
"* init" : "var description = Pango.FontDescription.from_string(\"monospace\");\n\tdescription.set_size(8000);\n\t this.el.override_font(description);\n\n",
"* pack" : "pack_start,false,true,0",
+ "xtype" : "SearchEntry",
"$ xns" : "Gtk",
"| void forwardSearch" : "(bool change_focus) {\n\tswitch(_this.windowstate.state) {\n\t\tcase WindowState.State.CODEONLY:\n\t\tcase WindowState.State.CODE:\n\t\t\t// search the code being edited..\n\t\t\t_this.windowstate.code_editor.forwardSearch(change_focus);\n\t\t\t\n\t\t\tbreak;\n\t\tcase WindowState.State.PREVIEW:\n\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {\n\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);\n\t\t\t} else { \n\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);\n\t\t\t}\n\t\t\n\t\t\tbreak;\n\t}\n\t\n}\n"
},
"$ xns" : "Gtk",
"| void forwardSearch" : "(bool change_focus) {\n\tswitch(_this.windowstate.state) {\n\t\tcase WindowState.State.CODEONLY:\n\t\tcase WindowState.State.CODE:\n\t\t\t// search the code being edited..\n\t\t\t_this.windowstate.code_editor.forwardSearch(change_focus);\n\t\t\t\n\t\t\tbreak;\n\t\tcase WindowState.State.PREVIEW:\n\t\t\tif (_this.windowstate.file.xtype == \"Gtk\") {\n\t\t\t\t_this.windowstate.window_gladeview.forwardSearch(change_focus);\n\t\t\t} else { \n\t\t\t\t _this.windowstate.window_rooview.forwardSearch(change_focus);\n\t\t\t}\n\t\t\n\t\t\tbreak;\n\t}\n\t\n}\n"
},
"$ xns" : "Gtk",
"items" : [
{
"$ xns" : "Gtk",
"items" : [
{
+ "* pack" : "set_image",
"xtype" : "Image",
"utf8 icon_name" : "system-search",
"xtype" : "Image",
"utf8 icon_name" : "system-search",
- "* pack" : "set_image",
"bool sensitive" : false,
"$ xns" : "Gtk"
}
]
},
{
"bool sensitive" : false,
"$ xns" : "Gtk"
}
]
},
{
"string label" : "Compile Status:",
"* pack" : "add",
"string label" : "Compile Status:",
"* pack" : "add",
"$ xns" : "Gtk",
"items" : [
{
"$ xns" : "Gtk",
"items" : [
{
"utf8 icon_name" : "dialog-error",
"* pack" : "set_image",
"utf8 icon_name" : "dialog-error",
"* pack" : "set_image",
"$ xns" : "Gtk",
"items" : [
{
"$ xns" : "Gtk",
"items" : [
{
+ "* pack" : "set_image",
"xtype" : "Image",
"utf8 icon_name" : "dialog-warning",
"xtype" : "Image",
"utf8 icon_name" : "dialog-warning",
- "* pack" : "set_image",
"$ xns" : "Gtk",
"items" : [
{
"$ xns" : "Gtk",
"items" : [
{
+ "utf8 icon_name" : "dialog-information",
"* pack" : "set_image",
"xtype" : "Image",
"* pack" : "set_image",
"xtype" : "Image",
- "utf8 icon_name" : "dialog-information",
"$ xns" : "Gtk",
"items" : [
{
"$ xns" : "Gtk",
"items" : [
{
+ "* pack" : "set_image",
"xtype" : "Image",
"utf8 icon_name" : "media-playback-start",
"xtype" : "Image",
"utf8 icon_name" : "media-playback-start",
- "* pack" : "set_image",
public class Xcls_search_entry : Object
{
public class Xcls_search_entry : Object
{
+ public Gtk.SearchEntry el;
private Xcls_MainWindow _this;
private Xcls_MainWindow _this;
{
_this = _owner;
_this.search_entry = this;
{
_this = _owner;
_this.search_entry = this;
- this.el = new Gtk.Entry();
+ this.el = new Gtk.SearchEntry();