"items": [
{
"listeners": {
- "activate": "function (self) {\n // this does not actually expand it..\n // that is done by GTK..\n \n \n\n if (!this.el.expanded) {\n this.onExpand();\n } else {\n this.onCollapse();\n }\n\t \n}",
+ "activate": "function (self) {\n // this does not actually expand it..\n // that is done by GTK..\n \n \n \tif (!this.get('/Editor').save()) {\n \t // popup!! - click handled.. \n \t return true;\n }\n\n if (!this.el.expanded) {\n this.onExpand();\n } else {\n this.onCollapse();\n }\n\t \n}",
"enter_notify_event": "function (self, event) {\nreturn;\n this.el.expanded = !this.el.expanded;\n//if (this.el.expanded ) {\n this.listeners.activate.call(this);\n// }\n\nreturn true;\n}"
},
"id": "expander",
"label": "Select Project or File",
"pack": "pack_start,false,true",
"xtype": "Expander",
- "|onCollapse": "function() {\n \n var nb = this.get('/LeftTopPanel.notebook');\n nb.el.set_current_page(0);\n}\n",
"|init": "function() {\n XObject.prototype.init.call(this);\n this.el.add_events (Gdk.EventMask.BUTTON_MOTION_MASK );\n}\n",
+ "|onCollapse": "function() {\n \n var nb = this.get('/LeftTopPanel.notebook');\n nb.el.set_current_page(0);\n}\n",
"|onExpand": "function() {\n var nb = this.get('/LeftTopPanel.notebook'); \n var pm = imports.Builder.Provider.ProjectManager.ProjectManager;\n \n \n var model = this.get('/LeftProjectTree.combomodel');\n // print (\"loading Projects?\")\n //console.dump(pm.projects);\n model.loadData(pm.projects);\n \n \n nb.el.set_current_page(1);\n //pm.on('changed', function() {\n\t//console.log(\"CAUGHT project manager change\");\n // _combo.model.loadData(pm.projects);\n //}\n return;\n}\n",
"|xns": "Gtk"
},
]
},
{
- "|xns": "Gtk",
- "xtype": "Button",
- "pack": "add",
"listeners": {
- "button_press_event": "function (self, event) {\n this.get('/MidPropTree.model').showData('events');\n return false;\n}"
+ "button_press_event": "function (self, event) {\n \n \tif (!this.get('/Editor').save()) {\n \t // popup!! - click handled.. \n \t return true;\n }\n this.get('/MidPropTree.model').showData('events');\n return false;\n}"
},
+ "pack": "add",
+ "xtype": "Button",
+ "|xns": "Gtk",
"items": [
{
"|xns": "Gtk",
]
},
{
- "|xns": "Gtk",
- "xtype": "Button",
- "pack": "add",
"listeners": {
- "button_press_event": "function (self, ev) {\n\tvar p = this.get('/AddPropertyPopup');\n\tif (!p.el) {\n\t\tp.init();\n\t}\n \tp.el.set_screen(Gdk.Screen.get_default());\n p.el.show_all();\n p.el.popup(null, null, null, null, 3, ev.button.time);\n return true;\n}"
+ "button_press_event": "function (self, ev) {\n\n \tif (!this.get('/Editor').save()) {\n \t // popup!! - click handled.. \n \t return true;\n }\n \n\tvar p = this.get('/AddPropertyPopup');\n\tif (!p.el) {\n\t\tp.init();\n\t}\n \tp.el.set_screen(Gdk.Screen.get_default());\n p.el.show_all();\n p.el.popup(null, null, null, null, 3, ev.button.time);\n return true;\n}"
},
+ "pack": "add",
+ "xtype": "Button",
+ "|xns": "Gtk",
"items": [
{
"|xns": "Gtk",
"items": [
{
"listeners": {
- "button_press_event": "function (self, ev) {\n\n \n var res = { }; \n \n if (!this.el.get_path_at_pos(ev.button.x,ev.button.y, res)) {\n return false; //not on a element.\n }\n \n // right click.\n if (ev.type == Gdk.EventType.BUTTON_PRESS && ev.button.button == 3) { \n // show popup!. \n if (res.column.title == 'value' && this.get('/LeftPanel').editing) {\n return false;\n }\n //if (! this.get('/LeftPanelPopup')LeftPanelPopup.el) LeftPanelPopup.init();\n var p = this.get('/LeftPanelPopup');\n if (!p.el) {\n p.init();\n }\n\n p.el.set_screen(Gdk.Screen.get_default());\n p.el.show_all();\n p.el.popup(null, null, null, null, 3, ev.button.time);\n //Seed.print(\"click:\" + res.column.title);\n \n \n return false;\n }\n \n \n if (res.column.title != 'value') {\n // XObject.error(\"column is not value?\");\n return false; // ignore.. - key click.. ??? should we do this??\n }\n \n // currently editing???\n// if ( this.activePath) {\n \n // this.activePath = false;\n // stop editing!!!!\n if (this.get('/Editor').dirty) {\n //if (!this.get('/Editor.buffer').checkSyntax()) {\n // this.get('/StandardErrorDialog').show(\"Fix errors in code and save..\"); \n // return true;\n // // error Dialog\n //}\n if (!this.get('/Editor.view').save()) {\n return true;\n }\n } \n this.get('/LeftPanel').editableColumn.items[0].el.stop_editing();\n this.get('/LeftPanel').editing = false;\n \n // XObject.error(\"Currently editing?\");\n // return false;\n // }\n \n var renderer = this.get('/LeftPanel').editableColumn.items[0].el; // set has_entry..\n \n var type = this.get('/LeftPanel.model').getType(res.path.to_string());\n \n // get options for this type -- this is to support option lists etc..\n var provider = this.get('/LeftTree').getPaleteProvider();\n var opts = provider.findOptions(type);\n \n if (opts === false) {\n // it's text etnry\n this.get('/LeftPanel').editableColumn.setOptions([]);\n renderer.has_entry = true;\n } else {\n this.get('/LeftPanel').editableColumn.setOptions(opts);\n renderer.has_entry = false;\n }\n this.get('/LeftPanel.model').startEditing(res.path.to_string(), 1);\n \n //Seed.print(\"click\" + ev.type);\n //console.dump(res);\n return false;\n\n \n \n}"
+ "button_press_event": "function (self, ev) {\n\n \n if (!this.get('/Editor').save()) {\n // popup!! - click handled.. \n return true;\n }\n var res = { }; \n \n if (!this.el.get_path_at_pos(ev.button.x,ev.button.y, res)) {\n return false; //not on a element.\n }\n \n // right click.\n if (ev.type == Gdk.EventType.BUTTON_PRESS && ev.button.button == 3) { \n // show popup!. \n if (res.column.title == 'value' && this.get('/LeftPanel').editing) {\n return false;\n }\n //if (! this.get('/LeftPanelPopup')LeftPanelPopup.el) LeftPanelPopup.init();\n var p = this.get('/LeftPanelPopup');\n if (!p.el) {\n p.init();\n }\n\n p.el.set_screen(Gdk.Screen.get_default());\n p.el.show_all();\n p.el.popup(null, null, null, null, 3, ev.button.time);\n //Seed.print(\"click:\" + res.column.title);\n \n \n return false;\n }\n \n \n if (res.column.title != 'value') {\n // XObject.error(\"column is not value?\");\n return false; // ignore.. - key click.. ??? should we do this??\n }\n \n // currently editing???\n// if ( this.activePath) {\n \n // this.activePath = false;\n // stop editing!!!!\n if (this.get('/Editor').dirty) {\n //if (!this.get('/Editor.buffer').checkSyntax()) {\n // this.get('/StandardErrorDialog').show(\"Fix errors in code and save..\"); \n // return true;\n // // error Dialog\n //}\n if (!this.get('/Editor.view').save()) {\n return true;\n }\n } \n this.get('/LeftPanel').editableColumn.items[0].el.stop_editing();\n this.get('/LeftPanel').editing = false;\n \n // XObject.error(\"Currently editing?\");\n // return false;\n // }\n \n var renderer = this.get('/LeftPanel').editableColumn.items[0].el; // set has_entry..\n \n var type = this.get('/LeftPanel.model').getType(res.path.to_string());\n \n // get options for this type -- this is to support option lists etc..\n var provider = this.get('/LeftTree').getPaleteProvider();\n var opts = provider.findOptions(type);\n \n if (opts === false) {\n // it's text etnry\n this.get('/LeftPanel').editableColumn.setOptions([]);\n renderer.has_entry = true;\n } else {\n this.get('/LeftPanel').editableColumn.setOptions(opts);\n renderer.has_entry = false;\n }\n this.get('/LeftPanel.model').startEditing(res.path.to_string(), 1);\n \n //Seed.print(\"click\" + ev.type);\n //console.dump(res);\n return false;\n\n \n \n}"
},
"id": "view",
"tooltip_column": 5,
"|shadow_type": "Gtk.ShadowType.IN",
"items": [
{
- "|xns": "Gtk",
- "xtype": "TreeView",
- "pack": "add",
- "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_size_request(150,-1);\n // set_reorderable: [1]\n \n var description = new Pango.FontDescription.c_new();\n description.set_size(8000);\n this.el.modify_font(description);\n \n this.selection = this.el.get_selection();\n this.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, this.get('/Window').targetList);\n Gtk.drag_source_add_text_targets(this.el); \n /*\n print(\"RP: TARGET:\" + LeftTree.atoms[\"STRING\"]);\n targets = new Gtk.TargetList();\n targets.add( LeftTree.atoms[\"STRING\"], 0, 0);\n targets.add_text_targets( 1 );\n Gtk.drag_dest_set_target_list(this.el, LeftTree.targetList);\n \n //if you want to allow text to be output elsewhere..\n //Gtk.drag_source_add_text_targets(this.el);\n */\n return true; \n}\n",
- "|headers_visible": false,
- "|enable_tree_lines": true,
"listeners": {
"drag_begin": "function (self, ctx) {\n // we could fill this in now...\n Seed.print('SOURCE: drag-begin');\n \n \n \n var iter = new Gtk.TreeIter();\n var s = this.selection;\n s.get_selected(this.get('/RightPalete.model').el, iter);\n var path = this.get('/RightPalete.model').el.get_path(iter);\n \n var pix = this.el.create_row_drag_icon ( path);\n \n \n Gtk.drag_set_icon_pixmap (ctx,\n pix.get_colormap(),\n pix,\n null,\n -10,\n -10);\n \n var value = new GObject.Value('');\n this.get('/RightPalete.model').el.get_value(iter, 0, value);\n if (!this.get('/RightPalete').provider) {\n return false;\n }\n this.el.dropList = this.get('/RightPalete').provider.getDropList(value.value);\n this.el.dragData = value.value;\n \n \n \n \n return true;\n}",
"drag_data_get": "function (self, drag_context, selection_data, info, time) {\n \t//Seed.print('Palete: drag-data-get: ' + target_type);\n if (this.el.dragData && this.el.dragData.length ) {\n selection_data.set_text(this.el.dragData ,this.el.dragData.length);\n }\n \n \n //this.el.dragData = \"TEST from source widget\";\n \n \n}",
- "drag_end": "function (self, drag_context) {\n \tSeed.print('SOURCE: drag-end');\n\tthis.el.dragData = false;\n\tthis.el.dropList = false;\n\tthis.get('/LeftTree.view').highlight(false);\n\treturn true;\n}"
+ "drag_end": "function (self, drag_context) {\n \tSeed.print('SOURCE: drag-end');\n\tthis.el.dragData = false;\n\tthis.el.dropList = false;\n\tthis.get('/LeftTree.view').highlight(false);\n\treturn true;\n}",
+ "button_press_event": "function (self, event) {\n return false;\n}"
},
+ "pack": "add",
+ "xtype": "TreeView",
+ "|enable_tree_lines": true,
+ "|headers_visible": false,
+ "|init": "function() {\n XObject.prototype.init.call(this);\n this.el.set_size_request(150,-1);\n // set_reorderable: [1]\n \n var description = new Pango.FontDescription.c_new();\n description.set_size(8000);\n this.el.modify_font(description);\n \n this.selection = this.el.get_selection();\n this.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, this.get('/Window').targetList);\n Gtk.drag_source_add_text_targets(this.el); \n /*\n print(\"RP: TARGET:\" + LeftTree.atoms[\"STRING\"]);\n targets = new Gtk.TargetList();\n targets.add( LeftTree.atoms[\"STRING\"], 0, 0);\n targets.add_text_targets( 1 );\n Gtk.drag_dest_set_target_list(this.el, LeftTree.targetList);\n \n //if you want to allow text to be output elsewhere..\n //Gtk.drag_source_add_text_targets(this.el);\n */\n return true; \n}\n",
+ "|xns": "Gtk",
"items": [
{
"|xns": "Gtk",