"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"
},
"items": [
{
"listeners": {
- "button_press_event": "function (self, ev) {\n \tconsole.log(\"button press?\");\n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button.button != 3) {\n print(\"click\" + ev.type);\n return false;\n }\n \n \n var res = {}; \n this.get('/LeftTree.view').el.get_path_at_pos(ev.button.x,ev.button.y, res);\n \n if (!this.get('/LeftTreeMenu').el) { this.get('/LeftTreeMenu').init(); }\n \n this.get('/LeftTreeMenu').el.set_screen(Gdk.Screen.get_default());\n this.get('/LeftTreeMenu').el.show_all();\n this.get('/LeftTreeMenu').el.popup(null, null, null, null, 3, ev.button.time);\n print(\"click:\" + res.path.to_string());\n return false;\n}",
+ "button_press_event": "function (self, ev) {\n \tconsole.log(\"button press?\");\n \t\n \tif (!this.get('/Editor').save()) {\n \t // popup!! - click handled.. \n \t return true;\n }\n \t\n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button.button != 3) {\n print(\"click\" + ev.type);\n return false;\n }\n \n \n var res = {}; \n this.get('/LeftTree.view').el.get_path_at_pos(ev.button.x,ev.button.y, res);\n \n if (!this.get('/LeftTreeMenu').el) { this.get('/LeftTreeMenu').init(); }\n \n this.get('/LeftTreeMenu').el.set_screen(Gdk.Screen.get_default());\n this.get('/LeftTreeMenu').el.show_all();\n this.get('/LeftTreeMenu').el.popup(null, null, null, null, 3, ev.button.time);\n print(\"click:\" + res.path.to_string());\n return false;\n}",
"drag_begin": "function (self, drag_context) {\n\tprint('SOURCE: drag-begin');\n this.targetData = false;\n // find what is selected in our tree...\n var iter = new Gtk.TreeIter();\n var s = this.selection;\n s.get_selected(this.get('/LeftTree.model').el, iter);\n\n // set some properties of the tree for use by the dropped element.\n var value = new GObject.Value('');\n this.get('/LeftTree.model').el.get_value(iter, 2, value);\n var data = JSON.parse(value.value);\n var xname = this.get('/LeftTree.model').file.guessName(data);\n \n this.el.dragData = xname;\n this.el.dropList = this.get('/LeftTree').getPaleteProvider().getDropList(xname);\n \n\n // make the drag icon a picture of the node that was selected\n var path = this.get('/LeftTree.model').el.get_path(iter);\n this.el.treepath = path.to_string();\n \n var pix = this.el.create_row_drag_icon ( path);\n \n Gtk.drag_set_icon_pixmap (ctx,\n pix.get_colormap(),\n pix,\n null,\n -10,\n -10);\n \n return true;\n}",
"drag_end": "function (self, drag_context) {\n\tSeed.print('LEFT-TREE: drag-end');\n this.el.dragData = false;\n this.el.dropList = false;\n this.targetData = false;\n this.get('/LeftTree.view').highlight(false);\n return true;\n}",
"drag_motion": "function (self, ctx, x, y, time) {\n console.log(\"LEFT-TREE: drag-motion\");\n var src = Gtk.drag_get_source_widget(ctx);\n\n // a drag from elsewhere...- prevent drop..\n if (!src.dragData) {\n print(\"no drag data!\");\n Gdk.drag_status(ctx, 0, time);\n this.targetData = false;\n return true;\n }\n var action = Gdk.DragAction.COPY;\n if (src == this.el) {\n // unless we are copying!!! ctl button..\n action = ctx.actions & Gdk.DragAction.MOVE ? Gdk.DragAction.MOVE : Gdk.DragAction.COPY ;\n }\n var data = {};\n\n\t\tif (!this.get('/LeftTree.model').el.iter_n_children(null)) {\n\t\t\t// no children.. -- asume it's ok..\n\t\t\tthis.targetData = [ '' , Gtk.TreeViewDropPosition.INTO_OR_AFTER , ''];\n\t\t\tGdk.drag_status(ctx, action ,time);\n\t\t\treturn true;\n\t\t}\n\n print(\"GETTING POS\");\n var isOver = this.get('/LeftTree.view').el.get_dest_row_at_pos(x,y, data);\n print(\"ISOVER? \" + isOver);\n if (!isOver) {\n Gdk.drag_status(ctx, 0 ,time);\n return false; // not over apoint!?!\n }\n // drag node is parent of child..\n console.log(\"SRC TREEPATH: \" + src.treepath);\n console.log(\"TARGET TREEPATH: \" + data.path.to_string());\n \n // nned to check a few here..\n //Gtk.TreeViewDropPosition.INTO_OR_AFTER\n //Gtk.TreeViewDropPosition.INTO_OR_BEFORE\n //Gtk.TreeViewDropPosition.AFTER\n //Gtk.TreeViewDropPosition.BEFORE\n \n if (typeof(src.treepath) != 'undefined' && \n src.treepath == data.path.to_string().substring(0,src.treepath.length)) {\n print(\"subpath drag\");\n Gdk.drag_status(ctx, 0 ,time);\n return false;\n }\n \n // check that \n //print(\"DUMPING DATA\");\n //console.dump(data);\n // path, pos\n \n print(data.path.to_string() +' => '+ data.pos);\n var tg = this.get('/LeftTree.model').findDropNodeByPath(\n data.path.to_string(), src.dropList, data.pos);\n \n this.get('/LeftTree.view').highlight(tg);\n if (!tg.length) {\n print(\"Can not find drop node path\");\n this.targetData = false;\n Gdk.drag_status(ctx, 0, time);\n return true;\n }\n //console.dump(tg);\n this.targetData = tg; \n \n \n Gdk.drag_status(ctx, action ,time);\n \n return true;\n}",
]
},
{
- "|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,
"pack": "pack_start,false,false,0",
"xtype": "CheckButton",
"|xns": "Gtk"
+ },
+ {
+ "listeners": {
+ "clicked": "function (self) {\n this.get('/RightBrowser.view').renderJS(null,true);\n}"
+ },
+ "label": "Redraw",
+ "pack": "pack_start,false,false,0",
+ "xtype": "Button",
+ "|xns": "Gtk"
}
]
},
"listeners": {
"load_finished": "function (self, object) {\n print(\"load finished\");\n// print(\"load_finished\"); return;\n\t// if (this.ready) { // dont do it twice!\n\t // return; \n\t//}\n\tif (!this.inspectorShown) {\n this.el.get_inspector().show();\n this.inspectorShown = true;\n\t}\n\n\tthis.ready = true;\n\t\n if (this.pendingRedraw) {\n this.pendingRedraw = false;\n this.refreshRequired = true;\n }\n //var js = this.get('/LeftTree.model').toJS();\n //if (js && js[0]) {\n \t// this.renderJS(js[0]);\n \t//}\n\n}",
"script_alert": "function (self, object, p0) {\n // \tprint(p0);\n return false;\n return true; // do not display anything...\n}",
- "console_message": "function (self, object, p0, p1) {\n print(object);\n // console.log(object);\n \n\n if (object.match(/^\\{/)) {\n this.refreshRequired = true;\n this.lastRedraw = 0;\n this.runRefresh();\n }\n \n \n if (!object.match(/^\\{/)) {\n \n //this.get('/Terminal').feed(object);\n return true; // do not handle!!! -> later maybe in console..\n }\n \n \n \n \n // console.log(object);\n var val = JSON.parse(object);\n\n if (typeof(val['hover-node']) != 'undefined') {\n this.activeNode = val['hover-node'];\n console.log('active node: ' + this.activeNode);\n return true;\n }\n\n var ret = false;\n if (typeof(val['id']) != 'undefined') {\n // this.activeNode = val['id'];\n var tg = this.get('/LeftTree.model').findDropNode(val['id'], true); \n if (!tg || typeof(tg[0]) == 'undefined') {\n return false;\n }\n print(\"SELECT node \" + tg[0]);\n \n this.get('/LeftTree.view').selectNode(tg[0]);\n ret = true;\n \n } \n if (ret && typeof(val['set']) != 'undefined') {\n this.get('/LeftPanel.model').add({\n key : val['set'],\n val : val['value']\n });\n //console.log('active node: ' + this.activeNode);\n \n }\n //Seed.print('a:'+a);\n //Seed.print('b:'+b);\n //Seed.print('c:'+c);\n return ret;\n}",
+ "console_message": "function (self, object, p0, p1) {\n print(object);\n // console.log(object);\n \n\n if (object.match(/variable/) && object.match(/Builder/)) {\n print(\"got builder missing message\");\n this.refreshRequired = true;\n this.lastRedraw = 0;\n this.runRefresh();\n return true;\n }\n \n \n if (!object.match(/^\\{/)) {\n \n //this.get('/Terminal').feed(object);\n return true; // do not handle!!! -> later maybe in console..\n }\n \n \n \n \n // console.log(object);\n var val = JSON.parse(object);\n\n if (typeof(val['hover-node']) != 'undefined') {\n this.activeNode = val['hover-node'];\n console.log('active node: ' + this.activeNode);\n return true;\n }\n\n var ret = false;\n if (typeof(val['id']) != 'undefined') {\n // this.activeNode = val['id'];\n var tg = this.get('/LeftTree.model').findDropNode(val['id'], true); \n if (!tg || typeof(tg[0]) == 'undefined') {\n return false;\n }\n print(\"SELECT node \" + tg[0]);\n \n this.get('/LeftTree.view').selectNode(tg[0]);\n ret = true;\n \n } \n if (ret && typeof(val['set']) != 'undefined') {\n this.get('/LeftPanel.model').add({\n key : val['set'],\n val : val['value']\n });\n //console.log('active node: ' + this.activeNode);\n \n }\n //Seed.print('a:'+a);\n //Seed.print('b:'+b);\n //Seed.print('c:'+c);\n return ret;\n}",
"drag_motion": "function (w, ctx, x, y, time, ud) {\n // console.log('DRAG MOTION'); \n // status:\n // if lastCurrentNode == this.currentNode.. -- don't change anything..\n this.targetData = [];\n this.el.execute_script(\"Builder.overPos(\" + x +','+ y + \");\");\n \n // A) find out from drag all the places that node could be dropped.\n var src = Gtk.drag_get_source_widget(ctx);\n if (!src.dropList) {\n Gdk.drag_status(ctx, 0, time);\n return true;\n }\n // b) get what we are over.. (from activeNode)\n // tree is empty.. - list should be correct..\n if (!this.get('/LeftTree.model').currentTree) {\n Gdk.drag_status(ctx, Gdk.DragAction.COPY,time);\n return true;\n \n }\n // c) ask tree where it should be dropped... - eg. parent.. (after node ontop)\n \n var tg = this.get('/LeftTree.model').findDropNode(this.activeNode, src.dropList);\n console.dump(tg);\n if (!tg.length) {\n Gdk.drag_status(ctx, 0,time);\n this.get('/LeftTree.view').highlight(false);\n return true;\n }\n \n // if we have a target..\n // -> highlight it! (in browser)\n // -> highlight it! (in tree)\n \n Gdk.drag_status(ctx, Gdk.DragAction.COPY,time);\n this.get('/LeftTree.view').highlight(tg);\n this.targetData = tg;\n // for tree we should handle this...\n return true;\n}",
"drag_drop": "function (w, ctx, x, y,time, ud) {\n\tprint(\"TARGET: drag-drop\");\n var is_valid_drop_site = true;\n \n \n Gtk.drag_get_data\n (\n w, /* will receive 'drag-data-received' signal */\n ctx, /* represents the current state of the DnD */\n this.get('/Window').atoms[\"STRING\"], /* the target type we want */\n time /* time stamp */\n );\n \n \n /* No target offered by source => error */\n \n\n\treturn is_valid_drop_site;\n}",
"drag_data_received": "function (w, ctx, x, y, sel_data, target_type, time, ud) \n {\n print(\"Browser: drag-data-received\");\n var delete_selection_data = false;\n vardnd_success = false;\n /* Deal with what we are given from source */\n if( sel_data && sel_data.length ) {\n \n if (ctx.action == Gdk.DragAction.ASK) {\n /* Ask the user to move or copy, then set the ctx action. */\n }\n\n if (ctx.action == Gdk.DragAction.MOVE) {\n delete_selection_data = true;\n }\n var source = Gtk.drag_get_source_widget(ctx);\n\n print(\"Browser: source.DRAGDATA? \" + source.dragData);\n if (this.targetData) {\n print(this.targetData);\n this.get('/LeftTree.model').dropNode(this.targetData, source.dragData);\n }\n \n \n \n dnd_success = true;\n\n }\n\n if (dnd_success == false)\n {\n Seed.print (\"DnD data transfer failed!\\n\");\n }\n \n Gtk.drag_finish (ctx, dnd_success, delete_selection_data, time);\n return true;\n }",
"|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\n \tif (!this.get('/Editor').save()) {\n \t // popup!! - click handled.. \n \t return true;\n }\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",