//>>built
define("dojox/sketch/_Plugin","dojo/_base/kernel dojo/_base/lang dojo/_base/array dojo/_base/declare dojo/_base/connect dijit/form/ToggleButton".split(" "),function(b){return b.declare("dojox.sketch._Plugin",null,{constructor:function(a){a&&b.mixin(this,a);this._connects=[]},figure:null,iconClassPrefix:"dojoxSketchIcon",itemGroup:"toolsGroup",button:null,queryCommand:null,shape:"",useDefaultCommand:!0,buttonClass:dijit.form.ToggleButton,_initButton:function(){if(this.shape.length){var a=this.iconClassPrefix+
" "+this.iconClassPrefix+this.shape.charAt(0).toUpperCase()+this.shape.substr(1);this.button||(this.button=new this.buttonClass({label:this.shape,showLabel:!1,iconClass:a,dropDown:this.dropDown,tabIndex:"-1"}),this.connect(this.button,"onClick","activate"))}},attr:function(a,b){return this.button.attr(a,b)},onActivate:function(){},activate:function(a){this.onActivate();this.figure.setTool(this);this.attr("checked",!0)},onMouseDown:function(a){},onMouseMove:function(a){},onMouseUp:function(a){},destroy:function(a){b.forEach(this._connects,
b.disconnect)},connect:function(a,c,d){this._connects.push(b.connect(a,c,this,d))},setFigure:function(a){this.figure=a},setToolbar:function(a){this._initButton();this.button&&a.addChild(this.button);this.itemGroup&&a.addGroupItem(this,this.itemGroup)}})});