4 * Copyright 2009, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://tinymce.moxiecode.com/license
8 * Contributing: http://tinymce.moxiecode.com/contributing
12 * This class is the base class for all container controls like toolbars. This class should not
13 * be instantiated directly other container controls should inherit from this one.
15 * @class tinymce.ui.Container
16 * @extends tinymce.ui.Control
18 tinymce.create('tinymce.ui.Container:tinymce.ui.Control', {
20 * Base contrustor a new container control instance.
24 * @param {String} id Control id to use for the container.
25 * @param {Object} s Optional name/value settings object.
27 Container : function(id, s, editor) {
28 this.parent(id, s, editor);
31 * Array of controls added to the container.
42 * Adds a control to the collection of controls for the container.
45 * @param {tinymce.ui.Control} c Control instance to add to the container.
46 * @return {tinymce.ui.Control} Same control instance that got passed in.
49 this.lookup[c.id] = c;
50 this.controls.push(c);
56 * Returns a control by id from the containers collection.
59 * @param {String} n Id for the control to retrive.
60 * @return {tinymce.ui.Control} Control instance by the specified name or undefined if it wasn't found.
63 return this.lookup[n];