{ "id": "file-gtk-11", "name": "WindowRightPalete", "parent": "", "title": false, "path": "/home/alan/gitlive/app.Builder.js/Builder4/WindowRightPalete.bjs", "items": [ { ".signal:void:drag_end()": "", ".Project.Project:provider": "", "id": "RightPalete", "pack": "pack_start,false,false", "xtype": "VBox", "|void:hide": " () {\n \n _this.buttonbar.el.show();\n _this.viewbox.el.hide();\n // print(\"TRIED TO HIDE\");\n}\n", "|void:show": "function() {\n _this.buttonbar.el.hide();\n _this.viewbox.el.show();\n // this.get('model').expanded();\n \n}\n", "|xns": "Gtk", "items": [ { "|xns": "Gtk", "xtype": "VBox", "pack": "add", "id": "buttonbar", "items": [ { "listeners": { "clicked": " (self) => {\n\t_this..show();\n}" }, "pack": "pack_start,false,true", "xtype": "Button", "|xns": "Gtk", "items": [ { "|xns": "Gtk", "xtype": "Image", "pack": "add", "|stock": "Gtk.STOCK_GOTO_FIRST", "|icon_size": "Gtk.IconSize.MENU" } ] }, { "listeners": { "enter_notify_event": " (self, event) => {\n RightPalete.show();\n return false;\n}" }, "angle": 270, "label": "Palete", "pack": "add", "xtype": "Label", "|init": " this.el.add_events ( Gdk.EventMask.BUTTON_MOTION_MASK );\n \n", "|xns": "Gtk" } ] }, { "|xns": "Gtk", "xtype": "VBox", "pack": "add", "id": "viewbox", "items": [ { "|xns": "Gtk", "xtype": "HBox", "pack": "pack_start,false,true", "items": [ { "|xns": "Gtk", "xtype": "Label", "pack": "add", "label": "Palete" }, { "listeners": { "clicked": "function (self) {\n\t_this.RightPalete.hide();\n}" }, "pack": "pack_start,false,true", "xtype": "Button", "|xns": "Gtk", "items": [ { "|xns": "Gtk", "xtype": "Image", "pack": "add", "|stock": "Gtk.STOCK_GOTO_LAST", "|icon_size": "Gtk.IconSize.MENU" } ] } ] }, { "pack": "add", "xtype": "ScrolledWindow", "|init": " this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);\n this.el.set_size_request(-1,200);\n \n", "|shadow_type": "Gtk.ShadowType.IN", "|xns": "Gtk", "items": [ { "listeners": { "drag_begin": " ( ctx) => {\n // we could fill this in now...\n// Seed.print('SOURCE: drag-begin');\n \n \n \n Gtk.TreeIter iter;\n var s = _this.selection;\n \n s.get_selected(_this.model.el, out iter);\n var path = _this.model.el.get_path(iter);\n \n /// pix is a surface..\n var pix = this.el.create_row_drag_icon ( path);\n \n \n Gtk.drag_set_icon_surface (ctx, pix);\n Glib.Value val;\n \n\n _this.model.el.get_value(iter, 0, out value);\n if (_this.provider == null) {\n return false;\n }\n //if (!this.get('/RightPalete').provider) {\n // return false;\n //}\n this.dropList = _this.provider.getDropList((string)value);\n this.dragData = (string) value;\n \n \n return true;\n}", "drag_data_get": " (drag_context, selection_data, info, time) => {\n \t//Seed.print('Palete: drag-data-get: ' + target_type);\n if (this.el.dragData.length > 0 ) {\n selection_data.set_text(this.dragData ,this.dragData.length);\n }\n \n \n //this.el.dragData = \"TEST from source widget\";\n \n \n}", "drag_end": "( drag_context) => {\n \t//Seed.print('SOURCE: drag-end');\n\t\n\tthis.dragData = \"\";\n\tthis.dropList = null;\n\t_this.drag_end(); // call signal..\n\t//this.get('/LeftTree.view').highlight(false);\n\treturn true;\n}", "button_press_event": " ( event) => {\n\n //\tif (!this.get('/Editor').save()) {\n //\t // popup!! - click handled.. \n// \t return true;\n// }\n return false;\n}" }, ".GLib.List:dropList": "", ".string:dragData": "", "pack": "add", "xtype": "TreeView", "|enable_tree_lines": "true", "|headers_visible": "false", "|init": " {\n this.el.set_size_request(150,-1);\n // set_reorderable: [1]\n \n var description = new Pango.FontDescription();\n description.set_size(8000);\n this.el.modify_font(description);\n \n var selection = this.el.get_selection();\n selection.set_mode( Gtk.SelectionMode.SINGLE);\n // this.selection.signal['changed'].connect(function() {\n // _view.listeners['cursor-changed'].apply(_view, [ _view, '']);\n //});\n // see: http://live.gnome.org/GnomeLove/DragNDropTutorial\n \n Gtk.drag_source_set (\n this.el, /* widget will be drag-able */\n Gdk.ModifierType.BUTTON1_MASK, /* modifier that will start a drag */\n null, /* lists of target to support */\n 0, /* size of list */\n Gdk.DragAction.COPY /* what to do with data after dropped */\n );\n //Gtk.drag_source_set_target_list(this.el, LeftTree.targetList);\n \n Gtk.drag_source_set_target_list(this.el, Application.targetList);\n Gtk.drag_source_add_text_targets(this.el); \n \n}\n", "|xns": "Gtk", "items": [ { "columns": "typeof(string),typeof(string)", "id": "model", "n_columns": 2, "pack": "set_model", "xtype": "ListStore", "|void:load": " (GLib.List tr, Gtk.TreeIter? iter)\n{\n if (iter == null) {\n this.el.clear();\n }\n //console.log('Project tree load: ' + tr.length);\n\n Gtk.TreeIter citer;\n //this.insert(citer,iter,0);\n for(var i =0 ; i < tr.length(); i++) {\n if (iter == null) {\n \n this.el.append(out citer); \n } else {\n this.el.insert(out citer,iter,-1);\n }\n \n var r = tr.nth_data(i);\n //Seed.print(r);\n this.el.set_value(citer, 0, r ); // title \n \n //this.el.set_value(citer, 1, new GObject.Value( r)); //id\n //if (r.cn && r.cn.length) {\n // this.load(r.cn, citer);\n //}\n }\n \n \n}", "|string:getValue": " (Gtk.TreeIter iter, int col) {\n GLib.Value gval;\n this.el.get_value(iter, col , out gval);\n return (string)gval;\n \n \n}", "|xns": "Gtk" }, { "pack": "append_column", "xtype": "TreeViewColumn", "|init": " this.el.add_attribute(_this.txtrender , \"markup\", 0 );\n \n", "|xns": "Gtk", "items": [ { "id": "txtrender", "pack": "pack_start", "xtype": "CellRendererText", "|xns": "Gtk" } ] } ] } ] } ] } ] } ], "permname": "", "modOrder": "" }