Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2468)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2469)
@@ -39,5 +39,5 @@
 		return;
 	}
-	definition = CKEDITOR.tools.extend( {}, CKEDITOR.dialog._.defaultDialogDefinition, definition() );
+	definition = CKEDITOR.tools.extend( {}, CKEDITOR.dialog._.defaultDialogDefinition, definition(), true );
 	if ( !( definition.title && definition.contents ) )
 	{
@@ -62,5 +62,5 @@
 			size : { width : 0, height : 0 },
 			contents : {}
-		});
+		}, true);
 
 	// Initialize the parts map.
@@ -197,4 +197,5 @@
 			page,
 			tab,
+			titleHtml = contents.title ? 'title="' + CKEDITOR.tools.htmlEncode( contents.title ) + '" ' : '';
 			elements = contents.elements;
 
@@ -208,5 +209,5 @@
 		page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) );
 		tab = CKEDITOR.dom.element.createFromHtml( [
-				'<span><div class="cke_dialog_tab">',
+				'<span><div class="cke_dialog_tab" ', titleHtml, '>',
 					'<div class="cke_dialog_tab_left"></div>',
 					'<div class="cke_dialog_tab_center">',
@@ -304,5 +305,5 @@
 							{
 								type : 'text',
-								title: 'Test Text 1',
+								label: 'Test Text 1',
 								id: 'testText1',
 								default: 'hello world!'
@@ -311,5 +312,5 @@
 							{
 								type : 'text',
-								title: 'Test Text 2',
+								label: 'Test Text 2',
 								id: 'testText2',
 								default: 'Wheee'
@@ -318,5 +319,5 @@
 							{
 								type : 'text',
-								title: 'Test Text 3',
+								label: 'Test Text 3',
 								id: 'testText3',
 								default: 'Blah blah'
@@ -336,24 +337,24 @@
 									{
 										type : 'text',
-										title: 'Test Text 4',
-										id: 'testText4',
-										default: 'hello world!'
+										label : 'Test Text 4',
+										title : 'Your love is like bad medicine!',
+										id : 'testText4',
+										default : 'hello world!'
 									},
 
 									{
 										type : 'text',
-										title: 'Test Text 5',
-										id: 'testText5',
-										default: 'Wheee'
+										label : 'Test Text 5',
+										id : 'testText5',
+										default : 'Wheee'
 									},
 
 									{
 										type : 'text',
-										title: 'Test Text 6',
-										id: 'testText6',
-										default: 'Blah blah'
+										label : 'Test Text 6',
+										id : 'testText6',
+										default : 'Blah blah'
 									}
-								],
-								widths : [172, 172, 172]
+								]
 							}
 						]
@@ -367,6 +368,38 @@
 						elements : [
 							{
-								type : 'hbox',
-								children : []
+								type : 'vbox',
+								children : [
+									{
+										type : 'checkbox',
+										label: 'Enable this',
+										title : 'Shake it up, just like bad medicine!',
+										checked : false
+									},
+
+									{
+										type : 'checkbox',
+										label: 'Enable that',
+										checked : false
+									},
+
+									{
+										type : 'checkbox',
+										label: 'Enable those',
+										checked : false
+									},
+
+									{
+										type: 'radio',
+										label : 'Include library:',
+										title : 'Trying to include a library in LOLCODE.',
+										default : 'stdio',
+										items : [
+											[ 'Standard I/O', 'stdio', 'You need this to write Hello World.' ],
+											[ 'Standard C Library', 'stdlib', 'You need this to exit.' ],
+											[ 'POSIX Library', 'unistd', 'You need this to sleep.' ],
+											[ 'Signal Library', 'signal' ]
+										]
+									}
+								]
 							}
 						]
@@ -385,15 +418,15 @@
 			return;
 
-		var id = this.id = elementDefinition.id,
-			nodeName = ( nodeNameArg.call ? nodeNameArg( elementDefinition ) : nodeNameArg ) || 'div',
+		var nodeName = ( nodeNameArg.call ? nodeNameArg( elementDefinition ) : nodeNameArg ) || 'div',
 			html = [ '<', nodeName, ' ' ],
 			styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},
 			attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},
-			innerHTML = ( contentsArg && contentsArg.call ? contentsArg( dialog, elementDefinition ) : contentsArg ) || '';
+			innerHTML = ( contentsArg && contentsArg.call ? contentsArg( dialog, elementDefinition ) : contentsArg ) || '',
+			id = this.id = attributes.id || elementDefinition.id;
 
 		// Set the id.
 		if ( id )
 		{
-			html.push( 'id="' + id + '" ' );
+			attributes.id = id;
 			dialog._.contents[id] = this;
 		}
@@ -401,5 +434,6 @@
 		// Set the type and definition CSS class names.
 		var classes = {};
-		classes[ 'cke_dialog_ui_' + elementDefinition.type ] = 1;
+		if ( elementDefinition.type )
+			classes[ 'cke_dialog_ui_' + elementDefinition.type ] = 1;
 		if ( elementDefinition.className )
 			classes[ elementDefinition.className ] = 1;
@@ -414,4 +448,8 @@
 			finalClasses.push( i );
 		attributes.class = finalClasses.join( ' ' );
+
+		// Set the popup tooltop.
+		if ( elementDefinition.title )
+			attributes.title = elementDefinition.title;
 
 		// Write the inline CSS styles.
@@ -420,5 +458,5 @@
 			styleStr.push( i + ':' + styles[i] );
 		if ( styleStr.length > 0 )
-			html.push( 'style="', styleStr.join( '; ' ), '" ' );
+			attributes.style = ( attributes.style || '' ) + styleStr.join( '; ' );
 
 		// Write the attributes.
@@ -443,21 +481,35 @@
 		var innerHTML = function( dialog, innerDefinition )
 		{
-			var html = [];
+			var html = [ '<tbody><tr class="cke_dialog_ui_hbox">' ];
 			for ( var i = 0 ; i < innerDefinition.children.length ; i++ )
 			{
 				var child = innerDefinition.children[i],
-					type = child.type;
-				html.push( '<div style="float:left;' );
-				if ( innerDefinition.widths && isFinite( parseFloat( innerDefinition.widths[i] ) ) )
-					html.push( 'width:' + innerDefinition.widths[i] + 'px;' );
+					type = child.type,
+					styles = [],
+					className = 'cke_dialog_ui_hbox_child';
+				if ( i == 0 )
+					className = 'cke_dialog_ui_hbox_first';
+				else if ( i == innerDefinition.children.length - 1 )
+					className = 'cke_dialog_ui_hbox_last';
+				html.push( '<td class="', className, '" ' );
+				if ( innerDefinition.widths )
+				{
+					if ( isFinite( parseFloat( innerDefinition.widths[i] ) ) )
+						styles.push( 'width:' + innerDefinition.widths[i] + 'px' );
+				}
+				else
+					styles.push( 'width:' + Math.floor( 100 / innerDefinition.children.length ) + '%' );
 				if ( innerDefinition.height && isFinite( parseFloat( innerDefinition.height ) ) )
-					html.push( 'height:' + innerDefinition.height + 'px;' );
-				html.push( '" class="cke_dialog_ui_hbox_child">' );
+					styles.push( 'height:' + innerDefinition.height + 'px;' );
+				if ( styles.length > 0 )
+					html.push( 'style="' + styles.join( '; ' ) + '" ' );
+				html.push( '>' );
 				children.push( CKEDITOR.dialog._.uiElementBuilders[type].build( dialog, child, html ) );
-				html.push( '</div>' );
+				html.push( '</td>' );
 			}
+			html.push( '</tr></tbody>' );
 			return html.join( '' );
 		}
-		CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'div', null, null, innerHTML );
+		CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'table', null, null, innerHTML );
 	},
 
@@ -504,10 +556,10 @@
 	setValue : function( value )
 	{
-		this.getElement().value = value;
+		this.getElement().$.value = value;
 	},
 
 	getValue : function()
 	{
-		return this.getElement().value;
+		return this.getElement().$.value;
 	},
 
@@ -565,5 +617,5 @@
 					null;
 		}
-	});
+	}, true);
 
 CKEDITOR.ui.dialog.vbox.prototype = CKEDITOR.ui.dialog.hbox.prototype;
Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2468)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2469)
@@ -26,11 +26,14 @@
 		labeledElement : function( dialog, elementDefinition, htmlList, contentHtml )
 		{
-			if (arguments.length < 4)
-				return;
-
-			var innerHTML = function()
-			{
-				var html = [ '<div class="cke_dialog_ui_labeled_title">',
-						CKEDITOR.tools.htmlEncode( elementDefinition.title ),
+			if ( arguments.length < 4 )
+				return;
+
+			if ( !this._ )
+				this._ = {};
+			var children = this._.children = [];
+			var innerHTML = function()
+			{
+				var html = [ '<div class="cke_dialog_ui_labeled_label">',
+						CKEDITOR.tools.htmlEncode( elementDefinition.label ),
 						'</div>',
 						'<div class="cke_dialog_ui_labeled_content">',
@@ -43,7 +46,7 @@
 		},
 
-		inputElement : function( dialog, elementDefinition, htmlList, stylesArg, attributesArg, contentsArg )
-		{
-			if (arguments.length < 3)
+		textInput : function( dialog, elementDefinition, htmlList, stylesArg, attributesArg, contentsArg )
+		{
+			if ( arguments.length < 3 )
 				return;
 
@@ -51,5 +54,5 @@
 				this._ = {};
 			var attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},
-				id = this._.inputId = elementDefinition.id && elementDefinition.id + '_inputElement',
+				id = this._.inputId = attributes.id || elementDefinition.id, 
 				styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},
 				inputContents = ( contentsArg && contentsArg.call ? contentsArg( dialog, elementDefinition) : contentsArg ) || '';
@@ -57,5 +60,8 @@
 			// Set the id for the inner input element.
 			if ( id )
+			{
+				id = this._.inputId = id + '_textInput';
 				attributes.id = attributes.name = id;
+			}
 
 			// Set the type.
@@ -83,4 +89,9 @@
 
 			// Write the inline CSS styles.
+			var styleStr = [];
+			for ( var i in styles )
+				styleStr.push( i + ':' + styles[i] );
+			if ( styleStr.length > 0 )
+				attributes.style = styleStr.join( '; ' );
 
 			var innerHTML = function()
@@ -93,9 +104,85 @@
 			}
 			CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML );
+		},
+
+		checkbox : function( dialog, elementDefinition, htmlList )
+		{
+			if ( arguments.length < 3)
+				return;
+
+			if ( !this._ )
+				var _ = this._ = {};
+
+			var innerHTML = function()
+			{
+				var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition,
+						{
+							id : elementDefinition.id ? elementDefinition.id + '_checkbox' : CKEDITOR.tools.getNextNumber() + '_checkbox',
+							title : null,
+							type : null
+						}, true ),
+					html = [],
+					attributes = { class : 'cke_dialog_ui_checkbox_input', type : 'checkbox' };
+				if ( elementDefinition.checked )
+					attributes.checked = 'checked';
+				_.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes );
+				html.push( ' ', CKEDITOR.tools.htmlEncode( elementDefinition.label ) );
+				return html.join( '' );
+			}
+
+			CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'label', null, null, innerHTML );
+		},
+
+		radio : function( dialog, elementDefinition, htmlList )
+		{
+			if ( arguments.length < 3)
+				return;
+
+			if ( !this._ )
+				this._ = {};
+			var children = this._.children = [];
+
+			var innerHTML = function()
+			{
+				var html = [],
+					commonAttributes = { class : 'cke_dialog_ui_radio_item' },
+					commonName = elementDefinition.id ? elementDefinition.id + '_radio' : CKEDITOR.tools.getNextNumber() + '_radio';
+				for ( var i = 0 ; i < elementDefinition.items.length ; i++ )
+				{
+					var item = elementDefinition.items[i],
+						inputDefinition = CKEDITOR.tools.extend( {}, elementDefinition,
+								{
+									id : CKEDITOR.tools.getNextNumber() + '_radio_input',
+									title : null,
+									type : null
+								}, true ),
+						labelDefinition = CKEDITOR.tools.extend( {}, inputDefinition,
+								{
+									id : null,
+									title : item[2]
+								}, true ),
+						inputHtml = [],
+						inputAttributes = 
+						{
+							type : 'radio',
+							class : 'cke_dialog_ui_radio_input',
+							name : commonName,
+							value : item[1]
+						};
+					if ( elementDefinition.default == item.value )
+						inputAttributes.checked = 'checked';
+					children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) );
+					new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, html, 'label', null, null,
+						   inputHtml.join( '' ) + ' ' + item[0] );
+				}
+				return html.join( ' ' );
+			}
+
+			CKEDITOR.ui.dialog.labeledElement.call(this, dialog, elementDefinition, htmlList, innerHTML );
 		}
 	});
 
 CKEDITOR.ui.dialog.labeledElement.prototype = new CKEDITOR.ui.dialog.uiElement;
-CKEDITOR.ui.dialog.inputElement.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement,
+CKEDITOR.ui.dialog.textInput.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement,
 		{
 			getElement : function()
@@ -103,11 +190,52 @@
 				return CKEDITOR.document.getById( this._.inputId );
 			}
+		}, true);
+CKEDITOR.ui.dialog.checkbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement,
+		{
+			getElement : function()
+			{
+				return this._.checkbox.getElement();
+			},
+
+			setValue : function( checked )
+			{
+				this.getElement().$.checked = checked;
+			},
+
+			getValue : function()
+			{
+				return this.getElement().$.checked;
+			}
+		}, true);
+
+CKEDITOR.dialog.addUIElement( 'text',
+		{
+			build : function( dialog, elementDefinition, output )
+			{
+				return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output );
+			}
+		}, true);
+
+CKEDITOR.dialog.addUIElement( 'password',
+		{
+			build : function( dialog, elementDefinition, output )
+			{
+				return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output );
+			}
+		}, true);
+
+CKEDITOR.dialog.addUIElement( 'checkbox',
+		{
+			build : function( dialog, elementDefinition, output )
+			{
+				return new CKEDITOR.ui.dialog.checkbox( dialog, elementDefinition, output );
+			}
+		}, true);
+
+CKEDITOR.dialog.addUIElement( 'radio',
+		{
+			build : function( dialog, elementDefinition, output )
+			{
+				return new CKEDITOR.ui.dialog.radio( dialog, elementDefinition, output );
+			}
 		});
-
-CKEDITOR.dialog.addUIElement( 'text',
-		{
-			build : function( dialog, elementDefinition, output )
-			{
-				return new CKEDITOR.ui.dialog.inputElement( dialog, elementDefinition, output );
-			}
-		});
Index: /CKEditor/branches/prototype/_source/skins/default/dialog.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/dialog.css	(revision 2468)
+++ /CKEditor/branches/prototype/_source/skins/default/dialog.css	(revision 2469)
@@ -283,6 +283,7 @@
 }
 
+.cke_skin_default .cke_dialog_ui_hbox_first,
 .cke_skin_default .cke_dialog_ui_hbox_child
 {
-	margin-right: 10px;
-}
+	padding-right: 10px;
+}
