gBigNumTitle			= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/BigNumber' );

gDestsTotalTitle		= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/DestsTotalLabel' );
gDestsRemovedTitle		= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/DestsRemovedLabel' );
gDestsUsedTitle			= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/DestsUsedLabel' );
gBkmrksTotalTitle		= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/BkmarksTotalLabel' );
gBkmrksRemovedTitle		= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/BkmarksRemovedLabel' );
gBkmrksUsedTitle		= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/BkmarksUsedLabel' );
gLAnnotsTotalTitle		= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/LAnnotsTotalLabel' );
gLAnnotsRemovedTitle	= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/LAnnotsRemovedLabel' );
gLAnnotsUsedTitle		= zstring_width( zstring: '$$$/Dialogs/SpaceReductionResults/LAnnotsUsedLabel' );


gLabelItemWidth		= max( gDestsTotalTitle, gDestsRemovedTitle, gDestsUsedTitle,
						   gBkmrksTotalTitle, gBkmrksRemovedTitle, gBkmrksUsedTitle,
						   gLAnnotsTotalTitle, gLAnnotsRemovedTitle, gLAnnotsUsedTitle ) + max_char_width();

dialog( name: '$$$/Dialogs/SpaceReductionResults' )
{
	group()
	{
		cluster( name: '$$$/Dialogs/SpaceReductionResults/DestsClusterLabel', 
				 placement: place_row,
				 child_horizontal: align_proportional,
		         align_children: align_top )
		{
			group( alignment: align_left )
			{
				static_text( item_id: 'dstl', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
				static_text( item_id: 'dstr', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
				static_text( item_id: 'dstu', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
			}

			group( alignment: align_right )
			{
				static_text( name: '$$$/Dialogs/SpaceReductionResults/DestsTotalLabel', width: gLabelItemWidth );
				static_text( name: '$$$/Dialogs/SpaceReductionResults/DestsRemovedLabel', width: gLabelItemWidth );
				static_text( name: '$$$/Dialogs/SpaceReductionResults/DestsUsedLabel', width: gLabelItemWidth );
			}
		}

		cluster( name: '$$$/Dialogs/SpaceReductionResults/BkmarksClusterLabel', 
				 placement: place_row,
				 child_horizontal: align_proportional,
		         align_children: align_top )
		{
			group( alignment: align_left )
			{
				static_text( item_id: 'bkmt', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
				static_text( item_id: 'bkmr', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
				static_text( item_id: 'bkmu', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
			}

			group( alignment: align_right )
			{
				static_text( name: '$$$/Dialogs/SpaceReductionResults/BkmarksTotalLabel', width: gLabelItemWidth );
				static_text( name: '$$$/Dialogs/SpaceReductionResults/BkmarksRemovedLabel', width: gLabelItemWidth );
				static_text( name: '$$$/Dialogs/SpaceReductionResults/BkmarksUsedLabel', width: gLabelItemWidth );
			}
		}

		cluster( name: '$$$/Dialogs/SpaceReductionResults/LAnnotsClusterLabel', 
				 placement: place_row,
				 child_horizontal: align_proportional,
		         align_children: align_top )
		{
			group( alignment: align_left )
			{
				static_text( item_id: 'lant', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
				static_text( item_id: 'lanr', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
				static_text( item_id: 'lanu', name: '$$$/Dialogs/SpaceReductionResults/BigNumber', alignment: align_center, width: gBigNumTitle );
			}

			group( alignment: align_right )
			{
				static_text( name: '$$$/Dialogs/SpaceReductionResults/LAnnotsTotalLabel', width: gLabelItemWidth );
				static_text( name: '$$$/Dialogs/SpaceReductionResults/LAnnotsRemovedLabel', width: gLabelItemWidth );
				static_text( name: '$$$/Dialogs/SpaceReductionResults/LAnnotsUsedLabel', width: gLabelItemWidth );
			}
		}

		gap();

		ok();
	}
}
