a:27:{s:9:"#provides";s:20:"dojox.sketch._Plugin";s:9:"#resource";s:17:"sketch/_Plugin.js";s:9:"#requires";a:1:{i:0;a:3:{i:0;s:6:"common";i:1;s:17:"dijit.form.Button";i:2;s:5:"dijit";}}s:20:"dojox.sketch._Plugin";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"args";a:2:{s:8:"optional";b:1;s:4:"type";s:6:"Object";}}s:6:"source";s:63:" if(args){ dojo.mixin(this, args); } this._connects=[];";s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:27:"dojox.sketch._Plugin.figure";a:3:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:8:"instance";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:36:"dojox.sketch._Plugin.iconClassPrefix";a:2:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:30:"dojox.sketch._Plugin.itemGroup";a:2:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:27:"dojox.sketch._Plugin.button";a:3:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:8:"instance";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:33:"dojox.sketch._Plugin.queryCommand";a:2:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:26:"dojox.sketch._Plugin.shape";a:2:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:38:"dojox.sketch._Plugin.useDefaultCommand";a:2:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:32:"dojox.sketch._Plugin.buttonClass";a:2:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:7:"summary";s:0:"";}s:32:"dojox.sketch._Plugin._initButton";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:6:"source";s:501:" if(this.shape.length){ //TODO: i18n // var label = dojox.sketch.shapes[this.shape]; var className = this.iconClassPrefix+" "+this.iconClassPrefix + this.shape.charAt(0).toUpperCase() + this.shape.substr(1); if(!this.button){ var props = { label: this.shape, //I18N showLabel: false, iconClass: className, dropDown: this.dropDown, tabIndex: "-1" }; this.button = new this.buttonClass(props); this.connect(this.button,'onClick','activate'); } }";s:7:"private";b:1;s:7:"summary";s:0:"";}s:25:"dojox.sketch._Plugin.attr";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"name";a:1:{s:4:"type";s:0:"";}s:5:"value";a:1:{s:4:"type";s:1:"?";}}s:6:"source";s:38:" return this.button.attr(name,value);";s:7:"summary";s:0:"";}s:31:"dojox.sketch._Plugin.onActivate";a:4:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:6:"source";s:3:"} ";s:7:"summary";s:0:"";}s:29:"dojox.sketch._Plugin.activate";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:1:"?";}}s:6:"source";s:78:" this.onActivate(); this.figure.setTool(this); this.attr('checked',true);";s:7:"summary";s:0:"";}s:32:"dojox.sketch._Plugin.onMouseDown";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:3:"} ";s:7:"summary";s:0:"";}s:32:"dojox.sketch._Plugin.onMouseMove";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:3:"} ";s:7:"summary";s:0:"";}s:30:"dojox.sketch._Plugin.onMouseUp";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:3:"} ";s:7:"summary";s:0:"";}s:28:"dojox.sketch._Plugin.destroy";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"f";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:47:" dojo.forEach(this._connects,dojo.disconnect);";s:7:"summary";s:0:"";}s:28:"dojox.sketch._Plugin.connect";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:1:"o";a:1:{s:4:"type";s:0:"";}s:1:"f";a:1:{s:4:"type";s:0:"";}s:2:"tf";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:49:" this._connects.push(dojo.connect(o,f,this,tf));";s:7:"summary";s:0:"";}s:30:"dojox.sketch._Plugin.setFigure";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"figure";a:1:{s:4:"type";s:6:"Widget";}}s:6:"source";s:1820:"dojo.provide("dojox.sketch._Plugin"); //dojo.require("dojox.sketch"); dojo.require("dijit.form.Button"); dojo.declare("dojox.sketch._Plugin", null, { // summary // This represents a "plugin" to the dojox.sketch.Figure, which is basically // a single button on the Toolbar and some associated code constructor: function(/*Object?*/args){ if(args){ dojo.mixin(this, args); } this._connects=[]; }, figure: null, iconClassPrefix: "dojoxSketchIcon", itemGroup: 'toolsGroup', button: null, queryCommand: null, shape: "", useDefaultCommand: true, buttonClass: dijit.form.ToggleButton, _initButton: function(){ if(this.shape.length){ //TODO: i18n // var label = dojox.sketch.shapes[this.shape]; var className = this.iconClassPrefix+" "+this.iconClassPrefix + this.shape.charAt(0).toUpperCase() + this.shape.substr(1); if(!this.button){ var props = { label: this.shape, //I18N showLabel: false, iconClass: className, dropDown: this.dropDown, tabIndex: "-1" }; this.button = new this.buttonClass(props); this.connect(this.button,'onClick','activate'); } } }, attr: function(name,/*?*/value){ return this.button.attr(name,value); }, onActivate: function(){}, activate: function(/*?*/e){ this.onActivate(); this.figure.setTool(this); this.attr('checked',true); }, onMouseDown: function(e){}, onMouseMove: function(e){}, onMouseUp: function(e){}, destroy: function(f){ dojo.forEach(this._connects,dojo.disconnect); }, connect: function(o,f,tf){ this._connects.push(dojo.connect(o,f,this,tf)); }, setFigure: function(/*Widget*/figure){ // FIXME: detatch from previous figure!! this.figure = figure; // FIXME: prevent creating this if we don't need to (i.e., figure can't handle our command) this._initButton();";s:7:"summary";s:0:"";}s:31:"dojox.sketch._Plugin.setToolbar";a:5:{s:9:"prototype";s:20:"dojox.sketch._Plugin";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"toolbar";a:1:{s:4:"type";s:6:"Widget";}}s:6:"source";s:128:" if(this.button){ toolbar.addChild(this.button); } if(this.itemGroup){ toolbar.addGroupItem(this,this.itemGroup); }";s:7:"summary";s:0:"";}s:30:"dojox.sketch._Plugin._connects";a:3:{s:8:"instance";s:20:"dojox.sketch._Plugin";s:7:"private";b:1;s:7:"summary";s:0:"";}s:4:"this";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:1:{i:0;s:4:"args";}}s:7:"summary";s:0:"";}s:12:"dojox.sketch";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}