JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-4.0_full
[ckeditor.git] / _source / core / ui.js
diff --git a/_source/core/ui.js b/_source/core/ui.js
deleted file mode 100644 (file)
index 005dc13..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*\r
-Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
-For licensing, see LICENSE.html or http://ckeditor.com/license\r
-*/\r
-\r
-/**\r
- * Contains UI features related to an editor instance.\r
- * @constructor\r
- * @param {CKEDITOR.editor} editor The editor instance.\r
- * @example\r
- */\r
-CKEDITOR.ui = function( editor )\r
-{\r
-       if ( editor.ui )\r
-               return editor.ui;\r
-\r
-       /**\r
-        * Object used to hold private stuff.\r
-        * @private\r
-        */\r
-       this._ =\r
-       {\r
-               handlers : {},\r
-               items : {},\r
-               editor : editor\r
-       };\r
-\r
-       return this;\r
-};\r
-\r
-// PACKAGER_RENAME( CKEDITOR.ui )\r
-\r
-CKEDITOR.ui.prototype =\r
-{\r
-       /**\r
-        * Adds a UI item to the items collection. These items can be later used in\r
-        * the interface.\r
-        * @param {String} name The UI item name.\r
-        * @param {Object} type The item type.\r
-        * @param {Object} definition The item definition. The properties of this\r
-        *              object depend on the item type.\r
-        * @example\r
-        * // Add a new button named "MyBold".\r
-        * editorInstance.ui.add( 'MyBold', CKEDITOR.UI_BUTTON,\r
-        *     {\r
-        *         label : 'My Bold',\r
-        *         command : 'bold'\r
-        *     });\r
-        */\r
-       add : function( name, type, definition )\r
-       {\r
-               this._.items[ name ] =\r
-               {\r
-                       type : type,\r
-                       // The name of {@link CKEDITOR.command} which associate with this UI.\r
-                       command : definition.command || null,\r
-                       args : Array.prototype.slice.call( arguments, 2 )\r
-               };\r
-       },\r
-\r
-       /**\r
-        * Gets a UI object.\r
-        * @param {String} name The UI item hame.\r
-        * @example\r
-        */\r
-       create : function( name )\r
-       {\r
-               var item        = this._.items[ name ],\r
-                       handler = item && this._.handlers[ item.type ],\r
-                       command = item && item.command && this._.editor.getCommand( item.command );\r
-\r
-               var result = handler && handler.create.apply( this, item.args );\r
-\r
-               // Allow overrides from skin ui definitions..\r
-               item && ( result = CKEDITOR.tools.extend( result, this._.editor.skin[ item.type ], true ) );\r
-\r
-               // Add reference inside command object.\r
-               if ( command )\r
-                       command.uiItems.push( result );\r
-\r
-               return result;\r
-       },\r
-\r
-       /**\r
-        * Adds a handler for a UI item type. The handler is responsible for\r
-        * transforming UI item definitions in UI objects.\r
-        * @param {Object} type The item type.\r
-        * @param {Object} handler The handler definition.\r
-        * @example\r
-        */\r
-       addHandler : function( type, handler )\r
-       {\r
-               this._.handlers[ type ] = handler;\r
-       }\r
-};\r
-\r
-CKEDITOR.event.implementOn( CKEDITOR.ui );\r
-\r
-/**\r
- * (Virtual Class) Do not call this constructor. This class is not really part\r
- *             of the API. It just illustrates the features of hanlder objects to be\r
- *             passed to the {@link CKEDITOR.ui.prototype.addHandler} function.\r
- * @name CKEDITOR.ui.handlerDefinition\r
- * @constructor\r
- * @example\r
- */\r
-\r
- /**\r
- * Transforms an item definition into an UI item object.\r
- * @name CKEDITOR.handlerDefinition.prototype.create\r
- * @function\r
- * @param {Object} definition The item definition.\r
- * @example\r
- * editorInstance.ui.addHandler( CKEDITOR.UI_BUTTON,\r
- *     {\r
- *         create : function( definition )\r
- *         {\r
- *             return new CKEDITOR.ui.button( definition );\r
- *         }\r
- *     });\r
- */\r
-\r
-/**\r
- * Internal event fired when a new UI element is ready\r
- * @name CKEDITOR.ui#ready\r
- * @event\r
- * @param {Object} element The new element\r
- */\r