src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 11:44:56 +0000 (19:44 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 11:44:56 +0000 (19:44 +0800)
src/Builder4/MainWindow.vala

src/Builder4/MainWindow.bjs
src/Builder4/MainWindow.vala

index 1131b9e..3535848 100644 (file)
@@ -31,8 +31,8 @@
    "items" : [
     {
      "id" : "headerbar",
-     "xtype" : "HeaderBar",
      "* pack" : "set_titlebar",
+     "xtype" : "HeaderBar",
      "bool show_close_button" : true,
      "$ xns" : "Gtk",
      "string title" : "Application Builder",
@@ -45,8 +45,8 @@
        "items" : [
         {
          "bool use_popover" : false,
-         "xtype" : "MenuButton",
          "* pack" : "add",
+         "xtype" : "MenuButton",
          "$ xns" : "Gtk",
          "items" : [
           {
@@ -60,9 +60,9 @@
              "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}"
              },
+             "xtype" : "MenuItem",
              "string label" : "Open a new Window",
              "* pack" : "append",
-             "xtype" : "MenuItem",
              "$ xns" : "Gtk"
             },
             {
              "listeners" : {
               "activate" : " ( ) => {\n         Resources.singleton().fetchStart();\n}"
              },
+             "* pack" : "append",
              "xtype" : "MenuItem",
              "string label" : "Download updated Resources",
-             "* pack" : "append",
              "$ xns" : "Gtk"
             },
             {
              "listeners" : {
               "activate" : "() => {\n    About.singleton().el.show();\n    }"
              },
+             "string label" : "About the Builder",
              "* pack" : "append",
              "xtype" : "MenuItem",
-             "string label" : "About the Builder",
              "$ xns" : "Gtk"
             }
            ]
           },
           {
+           "xtype" : "Image",
            "utf8 icon_name" : "help-about",
            "* pack" : "set_image",
-           "xtype" : "Image",
            "$ xns" : "Gtk"
           }
          ]
     },
     {
      "id" : "vbox",
-     "* pack" : "add",
      "xtype" : "Box",
+     "* pack" : "add",
      "$ xns" : "Gtk",
      "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
      "$ homogeneous" : false,
        "items" : [
         {
          "id" : "leftpane",
-         "xtype" : "Box",
          "* pack" : "add1",
+         "xtype" : "Box",
          "$ xns" : "Gtk",
          "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
          "items" : [
           {
            "id" : "editpane",
-           "xtype" : "Paned",
            "* pack" : "pack_start,true,true,0",
+           "xtype" : "Paned",
            "$ xns" : "Gtk",
            "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
            "items" : [
             {
              "id" : "tree",
-             "xtype" : "Box",
              "* pack" : "add1",
+             "xtype" : "Box",
              "$ xns" : "Gtk",
              "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
             },
             {
              "id" : "props",
-             "xtype" : "Box",
              "* pack" : "add2",
+             "xtype" : "Box",
              "$ xns" : "Gtk",
              "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
             }
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                     "clicked" : "  ( ) => {\n  \n    _this.windowstate.switchState(WindowState.State.PREVIEW);\n    \n\n}"
                    },
                    "utf8 tooltip_text" : "Back",
-                   "* pack" : false,
                    "xtype" : "Button",
+                   "* pack" : false,
                    "width_request" : 50,
                    "$ xns" : "Gtk",
                    "height_request" : 50,
                    "items" : [
                     {
+                     "* pack" : "set_image",
                      "xtype" : "Image",
                      "utf8 icon_name" : "go-previous",
-                     "* pack" : "set_image",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "$ tooltop_text" : "\"Open File\"",
                    "items" : [
                     {
+                     "utf8 icon_name" : "document-open",
                      "* pack" : "set_image",
                      "xtype" : "Image",
-                     "utf8 icon_name" : "document-open",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "xtype" : "Image",
                      "utf8 icon_name" : "document-properties",
                      "* pack" : "set_image",
-                     "xtype" : "Image",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "* pack" : "set_image",
                      "xtype" : "Image",
                      "utf8 icon_name" : "emblem-system",
-                     "* pack" : "set_image",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "utf8 icon_name" : "list-add",
                      "* pack" : "set_image",
                      "xtype" : "Image",
-                     "utf8 icon_name" : "list-add",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "xtype" : "Image",
                      "utf8 icon_name" : "format-justify-left",
                      "* pack" : "set_image",
-                     "xtype" : "Image",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "* pack" : "set_image",
                      "xtype" : "Image",
                      "utf8 icon_name" : "appointment-new",
-                     "* pack" : "set_image",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "xtype" : "Image",
                      "utf8 icon_name" : "folder-new",
                      "* pack" : "set_image",
-                     "xtype" : "Image",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "utf8 icon_name" : "document-new",
                      "* pack" : "set_image",
                      "xtype" : "Image",
-                     "utf8 icon_name" : "document-new",
                      "$ xns" : "Gtk"
                     }
                    ]
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "height_request" : 50,
                    "items" : [
                     {
+                     "xtype" : "Image",
                      "utf8 icon_name" : "user-trash",
                      "* pack" : "set_image",
-                     "xtype" : "Image",
                      "$ xns" : "Gtk"
                     }
                    ]
       },
       {
        "bool homogeneous" : false,
-       "xtype" : "Box",
        "* pack" : "pack_end,false,true,0",
+       "xtype" : "Box",
        "$ xns" : "Gtk",
        "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
        "items" : [
         {
+         "string label" : "   ",
          "* pack" : "pack_start,true,true,0",
          "xtype" : "Label",
-         "string label" : "   ",
          "$ xns" : "Gtk"
         },
         {
          "bool show_text" : true,
-         "id" : "statusbar",
          "ulong handler_id" : "-1",
+         "id" : "statusbar",
          "* 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",
          "$ xns" : "Gtk"
         },
+        {
+         "* pack" : "pack_start,?bool?,?bool?,?uint?",
+         "xtype" : "Entry",
+         "$ xns" : "Gtk"
+        },
         {
          "* pack" : "pack_end,false,true,0",
          "xtype" : "MenuBar",
          "$ xns" : "Gtk",
          "items" : [
           {
+           "* pack" : "add",
            "xtype" : "MenuItem",
            "string label" : "Compile Status:",
-           "* pack" : "add",
            "$ xns" : "Gtk"
           },
           {
            "$ xns" : "Gtk",
            "items" : [
             {
+             "* pack" : "set_image",
              "xtype" : "Image",
              "utf8 icon_name" : "dialog-error",
-             "* pack" : "set_image",
              "$ xns" : "Gtk"
             }
            ]
            "$ xns" : "Gtk",
            "items" : [
             {
+             "utf8 icon_name" : "dialog-warning",
              "* pack" : "set_image",
              "xtype" : "Image",
-             "utf8 icon_name" : "dialog-warning",
              "$ xns" : "Gtk"
             }
            ]
            "$ xns" : "Gtk",
            "items" : [
             {
+             "xtype" : "Image",
              "utf8 icon_name" : "dialog-information",
              "* pack" : "set_image",
-             "xtype" : "Image",
              "$ xns" : "Gtk"
             }
            ]
            "$ xns" : "Gtk",
            "items" : [
             {
+             "utf8 icon_name" : "media-playback-start",
              "* pack" : "set_image",
              "xtype" : "Image",
-             "utf8 icon_name" : "media-playback-start",
              "$ xns" : "Gtk"
             }
            ]
index a3a281f..f1def25 100644 (file)
@@ -2222,9 +2222,12 @@ public class Xcls_MainWindow : Object
             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_MenuBar69( _this );
+            var child_2 = new Xcls_Entry69( _this );
             child_2.ref();
-            this.el.pack_end (  child_2.el , false,true,0 );
+            this.el.pack_start (  child_2.el , ?bool?,?bool?,?uint? );
+            var child_3 = new Xcls_MenuBar70( _this );
+            child_3.ref();
+            this.el.pack_end (  child_3.el , false,true,0 );
         }
 
         // user defined functions
@@ -2295,7 +2298,29 @@ public class Xcls_MainWindow : Object
         // user defined functions
     }
 
-    public class Xcls_MenuBar69 : Object
+    public class Xcls_Entry69 : Object
+    {
+        public Gtk.Entry el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Entry69(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Entry();
+
+            // my vars (dec)
+
+            // set gobject values
+        }
+
+        // user defined functions
+    }
+
+    public class Xcls_MenuBar70 : Object
     {
         public Gtk.MenuBar el;
         private Xcls_MainWindow  _this;
@@ -2304,7 +2329,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_MenuBar69(Xcls_MainWindow _owner )
+        public Xcls_MenuBar70(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuBar();
@@ -2312,7 +2337,7 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_MenuItem70( _this );
+            var child_0 = new Xcls_MenuItem71( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
             var child_1 = new Xcls_statusbar_errors( _this );
@@ -2331,7 +2356,7 @@ public class Xcls_MainWindow : Object
 
         // user defined functions
     }
-    public class Xcls_MenuItem70 : Object
+    public class Xcls_MenuItem71 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_MainWindow  _this;
@@ -2340,7 +2365,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_MenuItem70(Xcls_MainWindow _owner )
+        public Xcls_MenuItem71(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -2377,7 +2402,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Errors";
-            var child_0 = new Xcls_Image72( _this );
+            var child_0 = new Xcls_Image73( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2402,7 +2427,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image72 : Object
+    public class Xcls_Image73 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2411,7 +2436,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image72(Xcls_MainWindow _owner )
+        public Xcls_Image73(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2449,7 +2474,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Warnings";
-            var child_0 = new Xcls_Image74( _this );
+            var child_0 = new Xcls_Image75( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2473,7 +2498,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image74 : Object
+    public class Xcls_Image75 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2482,7 +2507,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image74(Xcls_MainWindow _owner )
+        public Xcls_Image75(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2520,7 +2545,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Depricated";
-            var child_0 = new Xcls_Image76( _this );
+            var child_0 = new Xcls_Image77( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2545,7 +2570,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image76 : Object
+    public class Xcls_Image77 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2554,7 +2579,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image76(Xcls_MainWindow _owner )
+        public Xcls_Image77(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2590,7 +2615,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Run";
-            var child_0 = new Xcls_Image78( _this );
+            var child_0 = new Xcls_Image79( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2609,7 +2634,7 @@ public class Xcls_MainWindow : Object
 
         // user defined functions
     }
-    public class Xcls_Image78 : Object
+    public class Xcls_Image79 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2618,7 +2643,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image78(Xcls_MainWindow _owner )
+        public Xcls_Image79(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();