| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- if(!dojo._hasResource["dojox.drawing.manager.StencilUI"]){
- dojo._hasResource["dojox.drawing.manager.StencilUI"] = true;
- dojo.provide("dojox.drawing.manager.StencilUI");
- (function(){
- var surface, surfaceNode;
- dojox.drawing.manager.StencilUI = dojox.drawing.util.oo.declare(
-
-
-
-
-
-
-
- function(options){
-
-
-
- surface = options.surface;
- this.canvas = options.canvas;
-
- this.defaults = dojox.drawing.defaults.copy();
- this.mouse = options.mouse;
- this.keys = options.keys;
- this._mouseHandle = this.mouse.register(this);
- this.stencils = {};
- },
- {
- register: function(/*Object*/stencil){
- this.stencils[stencil.id] = stencil;
- return stencil;
- },
- onUiDown: function(/*EventObject*/obj){
-
-
-
- if(!this._isStencil(obj)){ return; }
- this.stencils[obj.id].onDown(obj);
- },
- onUiUp: function(/*EventObject*/obj){
-
-
-
- if(!this._isStencil(obj)){ return; }
- this.stencils[obj.id].onUp(obj);
- },
- onOver: function(/*EventObject*/obj){
-
-
-
- if(!this._isStencil(obj)){ return; }
- this.stencils[obj.id].onOver(obj);
- },
- onOut: function(/*EventObject*/obj){
-
-
-
- if(!this._isStencil(obj)){ return; }
- this.stencils[obj.id].onOut(obj);
- },
- _isStencil: function(/*EventObject*/obj){
- return !!obj.id && !!this.stencils[obj.id] && this.stencils[obj.id].type == "drawing.library.UI.Button";
- }
- }
- );
-
- })();
- }
|