Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2470)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2471)
@@ -390,5 +390,5 @@
 
 									{
-										type: 'radio',
+										type : 'radio',
 										label : 'Include library:',
 										title : 'Trying to include a library in LOLCODE.',
@@ -400,4 +400,15 @@
 											[ 'Signal Library', 'signal' ]
 										]
+									},
+
+									{
+										type : 'button',
+										label : 'Click Me',
+										title : 'Click me plz!'
+									},
+
+									{
+										type : 'html',
+										html : '<strong>CKEditor rocks.</strong>'
 									}
 								]
@@ -471,48 +482,45 @@
 	},
 
-	hbox : function( dialog, elementDefinition, htmlList )
-	{
-		if (arguments.length < 3 )
+	hbox : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition, widths, height )
+	{
+		if ( arguments.length < 4 )
 			return;
 
 		if ( !this._ )
 			this._ = {};
-		var children = this._.children = [];
-		var innerHTML = function( dialog, innerDefinition )
+
+		var children = this._.children = childObjList;
+		var innerHTML = function()
 		{
 			var html = [ '<tbody><tr class="cke_dialog_ui_hbox">' ];
-			for ( var i = 0 ; i < innerDefinition.children.length ; i++ )
+			for ( var i = 0 ; i < childHtmlList.length ; i++ )
 			{
-				var child = innerDefinition.children[i],
-					type = child.type,
-					styles = [],
-					className = 'cke_dialog_ui_hbox_child';
+				var className = 'cke_dialog_ui_hbox_child',
+					styles = [];
 				if ( i == 0 )
 					className = 'cke_dialog_ui_hbox_first';
-				else if ( i == innerDefinition.children.length - 1 )
+				else if ( i == childHtmlList.length - 1 )
 					className = 'cke_dialog_ui_hbox_last';
 				html.push( '<td class="', className, '" ' );
-				if ( innerDefinition.widths )
+				if ( widths )
 				{
-					if ( isFinite( parseFloat( innerDefinition.widths[i] ) ) )
-						styles.push( 'width:' + innerDefinition.widths[i] + 'px' );
+					if ( widths[i] && isFinite( parseFloat( widths[i] ) ) )
+						styles.push( 'width:' + widths[i] + 'px' );
 				}
 				else
-					styles.push( 'width:' + Math.floor( 100 / innerDefinition.children.length ) + '%' );
-				if ( innerDefinition.height && isFinite( parseFloat( innerDefinition.height ) ) )
-					styles.push( 'height:' + innerDefinition.height + 'px;' );
+					styles.push( 'width:' + Math.floor( 100 / childHtmlList.length ) + '%' );
+				if ( height && isFinite( parseFloat( height ) ) )
+					styles.push( 'height:' + 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( '</td>' );
+					html.push( 'style="' + styles.join('; ') + '" ' );
+				html.push( '>', childHtmlList[i], '</td>' );
 			}
 			html.push( '</tr></tbody>' );
 			return html.join( '' );
 		}
-		CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'table', null, null, innerHTML );
-	},
-
-	vbox : function( dialog, elementDefinition, htmlList )
+		CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type : 'hbox' }, htmlList, 'table', null, null, innerHTML );
+	},
+
+	vbox : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition, width, heights )
 	{
 		if (arguments.length < 3 )
@@ -521,27 +529,24 @@
 		if ( !this._ )
 			this._ = {};
-		var children = this._.children = [];
-		var innerHTML = function( dialog, innerDefinition )
+
+		var children = this._.children = childObjList;
+		var innerHTML = function()
 		{
 			var html = [];
-			for ( var i = 0 ; i < innerDefinition.children.length ; i++ )
+			for ( var i = 0 ; i < childHtmlList.length ; i++ )
 			{
-				var child = innerDefinition.children[i],
-					type = child.type,
-					styles = [];
+				var styles = [];
 				html.push( '<div ' );
-				if ( innerDefinition.width && isFinite( parseFloat( innerDefinition.width ) ) )
-					styles.push( 'width:' + innerDefinition.width + 'px' );
-				if ( innerDefinition.heights && isFinite( parseFloat( innerDefinition.heights[i] ) ) )
-					styles.push( 'height:' + innerDefinition.heights[i] + 'px' );
+				if ( width && isFinite( parseFloat( width ) ) )
+					styles.push( 'width:' + width + 'px' );
+				if ( heights && isFinite( parseFloat( heights[i] ) ) )
+					styles.push( 'height:' + heights[i] + 'px' );
 				if ( styles.length > 0 )
 					html.push( 'style="', styles.join( '; ' ), '" ' );
-				html.push( ' class="cke_dialog_ui_vbox_child">' );
-				children.push( CKEDITOR.dialog._.uiElementBuilders[type].build( dialog, child, html ) );
-				html.push( '</div>' );
+				html.push( ' class="cke_dialog_ui_vbox_child">', childHtmlList[i], '</div>' );
 			}
 			return html.join( '' );
 		}
-		CKEDITOR.ui.dialog.uiElement.call(this, dialog, elementDefinition, htmlList, 'div', null, null, innerHTML );
+		CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type : 'vbox' }, htmlList, 'div', null, null, innerHTML );
 	}
 };
@@ -576,5 +581,5 @@
 };
 
-CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
+CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement,
 	{
 		setValue : function( value )
@@ -595,8 +600,10 @@
 		isChanged : function()
 		{
-			var retval = false;
 			for ( var i = 0 ; i < this._.children.length ; i++ )
-				retval |= this._.children[i].isChanged();
-			return retval;
+			{
+				if ( this._.children[i].isChanged() )
+					return true;
+			}
+			return false;
 		},
 
@@ -617,5 +624,5 @@
 					null;
 		}
-	}, true);
+	}, true );
 
 CKEDITOR.ui.dialog.vbox.prototype = CKEDITOR.ui.dialog.hbox.prototype;
@@ -632,17 +639,24 @@
 	});
 
-CKEDITOR.dialog.addUIElement( 'hbox',
-		{
-			build : function( dialog, elementDefinition, output )
+(function()
+{
+	var commonBuilder = {
+		build : function( dialog, elementDefinition, output )
+		{
+			var children = elementDefinition.children,
+				child,
+				childHtmlList = [],
+				childObjList = [];
+			for ( var i = 0 ; ( i < children.length && ( child = children[i] ) ) ; i++ )
 			{
-				return new CKEDITOR.ui.dialog.hbox( dialog, elementDefinition, output );
+				var childHtml = [];
+				childHtmlList.push( childHtml );
+				childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) );
 			}
-		});
-
-CKEDITOR.dialog.addUIElement( 'vbox',
-		{
-			build : function( dialog, elementDefinition, output )
-			{
-				return new CKEDITOR.ui.dialog.vbox( dialog, elementDefinition, output );
-			}
-		});
+			return new CKEDITOR.ui.dialog[elementDefinition.type]( dialog, childObjList, childHtmlList, output, elementDefinition );
+		}
+	};
+
+	CKEDITOR.dialog.addUIElement( 'hbox', commonBuilder );
+	CKEDITOR.dialog.addUIElement( 'vbox', commonBuilder );
+})();
Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2470)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2471)
@@ -141,9 +141,9 @@
 			if ( !this._ )
 				this._ = {};
-			var children = this._.children = [];
-
-			var innerHTML = function()
-			{
-				var html = [],
+			var children = [];
+
+			var innerHTML = function()
+			{
+				var inputHtmlList = [], html = [],
 					commonAttributes = { class : 'cke_dialog_ui_radio_item' },
 					commonName = elementDefinition.id ? elementDefinition.id + '_radio' : CKEDITOR.tools.getNextNumber() + '_radio';
@@ -173,11 +173,12 @@
 						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,
+					new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtmlList, 'label', null, null,
 						   inputHtml.join( '' ) + ' ' + item[0] );
 				}
-				return html.join( ' ' );
-			}
-
-			CKEDITOR.ui.dialog.labeledElement.call(this, dialog, elementDefinition, htmlList, innerHTML );
+				new CKEDITOR.ui.dialog.hbox( dialog, [], inputHtmlList, html );
+				return html.join( '' );
+			}
+
+			CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML );
 		},
 
@@ -190,9 +191,17 @@
 				this._ = {};
 
-			CKEDITOR.ui.dialog.uiElement.call(this, dialog, elementDefinition, htmlList, 'input' );
+			CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'input', null, 
+					{ value : elementDefinition.label, type : 'button' } );
+		},
+
+		html : function( dialog, elementDefinition, htmlList )
+		{
+			if ( arguments.length < 3 )
+				return;
+
+			CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'span', null, null, elementDefinition.html );
 		}
 	});
 
-CKEDITOR.ui.dialog.labeledElement.prototype = new CKEDITOR.ui.dialog.uiElement;
 CKEDITOR.ui.dialog.textInput.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement,
 		{
@@ -202,4 +211,5 @@
 			}
 		}, true );
+
 CKEDITOR.ui.dialog.checkbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement,
 		{
@@ -242,33 +252,31 @@
 		}, true );
 
-CKEDITOR.dialog.addUIElement( 'text',
-		{
-			build : function( dialog, elementDefinition, output )
-			{
-				return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output );
-			}
-		});
-
-CKEDITOR.dialog.addUIElement( 'password',
-		{
-			build : function( dialog, elementDefinition, output )
-			{
-				return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output );
-			}
-		});
-
-CKEDITOR.dialog.addUIElement( 'checkbox',
-		{
-			build : function( dialog, elementDefinition, output )
-			{
-				return new CKEDITOR.ui.dialog.checkbox( dialog, elementDefinition, output );
-			}
-		});
-
-CKEDITOR.dialog.addUIElement( 'radio',
-		{
-			build : function( dialog, elementDefinition, output )
-			{
-				return new CKEDITOR.ui.dialog.radio( dialog, elementDefinition, output );
-			}
-		});
+CKEDITOR.ui.dialog.labeledElement.prototype
+	= CKEDITOR.ui.dialog.button.prototype
+	= CKEDITOR.ui.dialog.html.prototype = new CKEDITOR.ui.dialog.uiElement;
+
+
+(function()
+{
+	var textBuilder = 
+	{
+		build : function( dialog, elementDefinition, output )
+		{
+			return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output );
+		}
+	},
+	commonBuilder = 
+	{
+		build : function( dialog, elementDefinition, output )
+		{
+			return new CKEDITOR.ui.dialog[elementDefinition.type]( dialog, elementDefinition, output );
+		}
+	};
+
+	CKEDITOR.dialog.addUIElement( 'text', textBuilder );
+	CKEDITOR.dialog.addUIElement( 'password', textBuilder );
+	CKEDITOR.dialog.addUIElement( 'checkbox', commonBuilder );
+	CKEDITOR.dialog.addUIElement( 'radio', commonBuilder );
+	CKEDITOR.dialog.addUIElement( 'button', commonBuilder );
+	CKEDITOR.dialog.addUIElement( 'html', commonBuilder );
+})();
Index: /CKEditor/branches/prototype/_source/skins/default/dialog.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/dialog.css	(revision 2470)
+++ /CKEditor/branches/prototype/_source/skins/default/dialog.css	(revision 2471)
@@ -288,2 +288,10 @@
 	padding-right: 10px;
 }
+
+.cke_skin_default .cke_dialog_ui_button
+{
+	border: #737357 1px solid;
+	color: #3b3b1f;
+	background-color: #c7c78f;
+	padding: 0px 6px;
+}
