Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / drawing / manager / StencilUI.js @ 12

History | View | Annotate | Download (1.19 KB)

1 9 andrej.cim
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6
7
8
if(!dojo._hasResource["dojox.drawing.manager.StencilUI"]){
9
dojo._hasResource["dojox.drawing.manager.StencilUI"]=true;
10
dojo.provide("dojox.drawing.manager.StencilUI");
11
(function(){
12
var _1,_2;
13
dojox.drawing.manager.StencilUI=dojox.drawing.util.oo.declare(function(_3){
14
_1=_3.surface;
15
this.canvas=_3.canvas;
16
this.defaults=dojox.drawing.defaults.copy();
17
this.mouse=_3.mouse;
18
this.keys=_3.keys;
19
this._mouseHandle=this.mouse.register(this);
20
this.stencils={};
21
},{register:function(_4){
22
this.stencils[_4.id]=_4;
23
return _4;
24
},onUiDown:function(_5){
25
if(!this._isStencil(_5)){
26
return;
27
}
28
this.stencils[_5.id].onDown(_5);
29
},onUiUp:function(_6){
30
if(!this._isStencil(_6)){
31
return;
32
}
33
this.stencils[_6.id].onUp(_6);
34
},onOver:function(_7){
35
if(!this._isStencil(_7)){
36
return;
37
}
38
this.stencils[_7.id].onOver(_7);
39
},onOut:function(_8){
40
if(!this._isStencil(_8)){
41
return;
42
}
43
this.stencils[_8.id].onOut(_8);
44
},_isStencil:function(_9){
45
return !!_9.id&&!!this.stencils[_9.id]&&this.stencils[_9.id].type=="drawing.library.UI.Button";
46
}});
47
})();
48
}