X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/SystemTray.html?ds=sidebyside diff --git a/docs/source/SystemTray.html b/docs/source/SystemTray.html deleted file mode 100644 index b48dc642..00000000 --- a/docs/source/SystemTray.html +++ /dev/null @@ -1,93 +0,0 @@ - -
-Ext.air.SystemTray = function(){ - var app = air.NativeApplication.nativeApplication; - var icon, isWindows = false, bitmaps; - - // windows - if(air.NativeApplication.supportsSystemTrayIcon) { - icon = app.icon; - isWindows = true; - } - - // mac - if(air.NativeApplication.supportsDockIcon) { - icon = app.icon; - } - - return { - - setIcon : function(icon, tooltip, initWithIcon){ - if(!icon){ // not supported OS - return; - } - var loader = new air.Loader(); - loader.contentLoaderInfo.addEventListener(air.Event.COMPLETE, function(e){ - bitmaps = new runtime.Array(e.target.content.bitmapData); - if (initWithIcon) { - icon.bitmaps = bitmaps; - } - }); - loader.load(new air.URLRequest(icon)); - if(tooltip && air.NativeApplication.supportsSystemTrayIcon) { - app.icon.tooltip = tooltip; - } - }, - - bounce : function(priority){ - icon.bounce(priority); - }, - - on : function(eventName, fn, scope){ - icon.addEventListener(eventName, function(){ - fn.apply(scope || this, arguments); - }); - }, - - hideIcon : function(){ - if(!icon){ // not supported OS - return; - } - icon.bitmaps = []; - }, - - showIcon : function(){ - if(!icon){ // not supported OS - return; - } - icon.bitmaps = bitmaps; - }, - - setMenu: function(actions, _parentMenu){ - if(!icon){ // not supported OS - return; - } - var menu = new air.NativeMenu(); - - for (var i = 0, len = actions.length; i < len; i++) { - var a = actions[i]; - if(a == '-'){ - menu.addItem(new air.NativeMenuItem("", true)); - }else{ - var item = menu.addItem(Ext.air.MenuItem(a)); - if(a.menu || (a.initialConfig && a.initialConfig.menu)){ - item.submenu = Ext.air.SystemTray.setMenu(a.menu || a.initialConfig.menu, menu); - } - } - - if(!_parentMenu){ - icon.menu = menu; - } - } - - return menu; - } - }; -}();- - \ No newline at end of file