resources/RooUsage.txt
[app.Builder.js] / src / Builder4 / MainWindow.bjs
index f12bf34..c1ec4a3 100644 (file)
@@ -16,7 +16,7 @@
    },
    "id" : "MainWindow",
    "default_width" : 800,
-   "* init" : " \n\t  \n    //this.el.show_all();\n    \n     ",
+   "* init" : " \n\t  \n    //this.el.show_all();\n    //try {\n         this.el.set_icon_name(\"roobuilder\");\n\t//} catch (Exception e) {\n\t//\tprint(\"no icon found\");\n//\t}",
    "| void openNewWindow" : "() {\n\tXcls_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}\n",
    "# Project.Project project" : "null",
    "# string title" : "\"Application Builder\"",
@@ -33,8 +33,8 @@
    "items" : [
     {
      "id" : "headerbar",
-     "* pack" : "set_titlebar",
      "xtype" : "HeaderBar",
+     "* pack" : "set_titlebar",
      "bool show_close_button" : true,
      "$ xns" : "Gtk",
      "string title" : "Application Builder",
@@ -47,8 +47,8 @@
        "items" : [
         {
          "bool use_popover" : false,
-         "* pack" : "add",
          "xtype" : "MenuButton",
+         "* pack" : "add",
          "$ xns" : "Gtk",
          "items" : [
           {
           "clicked" : "  ( ) => {\n   _this.windowstate.switchState(WindowState.State.FILES);\n      \n\n}"
          },
          "id" : "openbtn",
-         "xtype" : "Button",
          "* pack" : "add",
+         "xtype" : "Button",
          "$ xns" : "Gtk",
          "$ tooltop_text" : "\"Open File\"",
          "items" : [
     },
     {
      "id" : "vbox",
-     "xtype" : "Box",
      "* pack" : "add",
+     "xtype" : "Box",
      "$ xns" : "Gtk",
      "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
      "$ homogeneous" : false,
        "items" : [
         {
          "id" : "leftpane",
-         "* pack" : "add1",
          "xtype" : "Box",
+         "* pack" : "add1",
          "$ xns" : "Gtk",
          "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
          "items" : [
           {
            "id" : "editpane",
-           "* pack" : "pack_start,true,true,0",
            "xtype" : "Paned",
+           "* pack" : "pack_start,true,true,0",
            "$ xns" : "Gtk",
            "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
            "items" : [
             {
              "id" : "tree",
-             "* pack" : "add1",
              "xtype" : "Box",
+             "* pack" : "add1",
              "$ xns" : "Gtk",
              "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
             },
             {
              "id" : "props",
-             "* pack" : "add2",
              "xtype" : "Box",
+             "* pack" : "add2",
              "$ xns" : "Gtk",
              "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL"
             }
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "listeners" : {
-                    "clicked" : "  ( ) => {\n  \n\tswitch(_this.windowstate.state) {\n\t\tcase   WindowState.State.FILEPROJECT:\n\t\t\t _this.windowstate.switchState(WindowState.State.FILES);\n\t\t\t break;\n\t\tcase   WindowState.State.PROJECTCODEONLY:\n\t\t\t _this.windowstate.switchState(WindowState.State.CODEONLY);\n\t\t\t break;\n\t\t default: \n\t\t\t _this.windowstate.switchState(WindowState.State.PREVIEW);\n\t\t\tbreak;\n    }\n    \n\n}"
+                    "clicked" : "  ( ) => {\n   if (_this.windowstate.state == WindowState.State.FILEPROJECT) {\n    \n\t     _this.windowstate.switchState(WindowState.State.FILES);\n     } else { \n\t    _this.windowstate.switchState(WindowState.State.PREVIEW);\n    }\n    \n\n}"
                    },
                    "utf8 tooltip_text" : "Back",
-                   "xtype" : "Button",
                    "* pack" : false,
+                   "xtype" : "Button",
                    "width_request" : 50,
                    "$ xns" : "Gtk",
                    "height_request" : 50,
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "listeners" : {
-                    "clicked" : "  ( ) => {\n    \n     switch(_this.windowstate.state) {\n \t   case WindowState.State.FILES:\n\t \t   _this.windowstate.switchState(WindowState.State.FILEPROJECT);\n\t \t   break;\n \t   case WindowState.State.CODEONLY:\n \t \t   _this.windowstate.switchState(WindowState.State.PROJECTCODEONLY);\n\t \t   break;\n \t   default:\n \t     _this.windowstate.switchState(WindowState.State.PROJECT);\n \t     break;\n\t }     \n    \n}"
+                    "clicked" : "  ( ) => {\n     \n     if (_this.windowstate.state == WindowState.State.FILES) {\n     \n\t     _this.windowstate.switchState(WindowState.State.FILEPROJECT);\n     } else {\n \t     _this.windowstate.switchState(WindowState.State.PROJECT);\n\t }     \n   \n\n\n}"
                    },
                    "* pack" : false,
                    "xtype" : "Button",
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
       },
       {
        "bool homogeneous" : false,
-       "* pack" : "pack_end,false,true,0",
        "xtype" : "Box",
+       "* pack" : "pack_end,false,true,0",
        "$ xns" : "Gtk",
        "Gtk.Orientation orientation" : "Gtk.Orientation.HORIZONTAL",
        "items" : [
         },
         {
          "bool show_text" : true,
-         "ulong handler_id" : "-1",
          "id" : "statusbar",
+         "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",
           },
           {
            "id" : "statusbar_compilestatus_label",
-           "xtype" : "MenuItem",
            "* pack" : "add",
+           "xtype" : "MenuItem",
            "string label" : "Compile Status:",
            "$ xns" : "Gtk"
           },