gHighlightWidth=max(
	zstring_width(zstring: '$$$IDS_HIGHLIGHT_NONE'),
	zstring_width(zstring: '$$$IDS_HIGHLIGHT_PUSH'),
	zstring_width(zstring: '$$$IDS_HIGHLIGHT_OUTLINE'),
	zstring_width(zstring: '$$$IDS_HIGHLIGHT_INVERT'));

gLayoutWidth=max(
	zstring_width(zstring: '$$$IDS_TEXT_ONLY'),
	zstring_width(zstring: '$$$IDS_ICON_ONLY'),
	zstring_width(zstring: '$$$IDS_ICON_OVER_TEXT'),
	zstring_width(zstring: '$$$IDS_TEXT_OVER_ICON'),
	zstring_width(zstring: '$$$IDS_ICON_THEN_TEXT'),
	zstring_width(zstring: '$$$IDS_TEXT_THEN_ICON'),
	zstring_width(zstring: '$$$IDS_TEXT_ON_ICON'));

gStateWidth=max(
	zstring_width(zstring: '$$$IDS_FACE_NORMAL'),
	zstring_width(zstring: '$$$IDS_FACE_DOWN'),
	zstring_width(zstring: '$$$IDS_FACE_ROLLOVER'),
	zstring_width(zstring: '$$$IDS_FACE_WIDEST'));

gButtonWidth = max(
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Button/Choose'),
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Button/Clear'));

gColumnOneWidth = max(
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Button/Highlight'),
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Button/Layout'));

gColumnTwoWidth = max(
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Button/Label'),
	zstring_width(zstring: '$$$/Dialogs/FieldProps/Button/Icon'));

gOptions	= '$$$/Dialogs/FieldProps/Button/Options';
gLayout		= '$$$/Dialogs/FieldProps/Button/Layout';
gHighlight	= '$$$/Dialogs/FieldProps/Button/Highlight';
gLabel		= '$$$/Dialogs/FieldProps/Button/Label';
gIcon		= '$$$/Dialogs/FieldProps/Button/Icon';
gAppearance	= '$$$/Dialogs/FieldProps/Button/FaceAppearance';
gChoose		= '$$$/Dialogs/FieldProps/Button/Choose';
gClear		= '$$$/Dialogs/FieldProps/Button/Clear';
gAdvanced	= '$$$/Dialogs/FieldProps/Button/Advanced';
gButtonState = '$$$/Dialogs/FieldProps/Button/ButtonState';
gPreview	= '$$$/Dialogs/FieldProps/Button/Preview';

gSampleBoxWidth	= 64;
gSampleBoxHeight = 64;
gListBoxWidth	= gStateWidth;
gListBoxHeight	= gEditTextHeight * 5;
gEditItemWidth	= gSampleBoxWidth + gButtonWidth + gGap;

dialog(name: '$$$/Dialogs/FieldProps', target_id: 'text')
{
	view(align_children: align_top, alignment:align_fill)
	{
		view(align_children: align_left, alignment:align_fill)
		{
			view(align_children: align_row, alignment:align_fill)
			{
				view(align_children: align_right, width: gColumnOneWidth)
				{
					static_text(item_id: 'slay', name: gLayout);
				}
				view(align_children: align_left)
				{
					popup(item_id: 'layo', width: gLayoutWidth);
				}
				button(item_id: 'advn', name: gAdvanced);
			}
			view(align_children: align_row)
			{
				view(align_children: align_right, width: gColumnOneWidth)
				{
					static_text(item_id: 'shig', name: gHighlight);
				}
				view(align_children: align_left)
				{
					popup(item_id: 'high', width: gHighlightWidth);
				}
			}
			cluster(item_id: 'ilcl', name:gAppearance, align_children:align_fill, alignment:align_fill)
			{
				view(align_children: align_left, alignment:align_fill)
				{
					static_text(name: gButtonState);
					view(align_children: align_top, alignment:align_fill)
					{
						list_box(item_id: 'stat', width: gListBoxWidth + 50, height: gListBoxHeight);
						gap(height:gGap);
						view(align_children: align_left, alignment:align_fill)
						{
							view(align_children: align_row, alignment:align_fill)
							{
								view(align_children: align_right, width: gColumnTwoWidth)
								{
									static_text(name: gLabel);
								}
								view(alignment:align_fill)
								{
									edit_text(item_id: 'text', alignment:align_fill);
								}
							}
							view(align_children: align_top)
							{
								view(align_children: align_right, width: gColumnTwoWidth)
								{
									static_text(name: gIcon);
								}
								button(item_id: 'samp', picture: true, width: gSampleBoxWidth, height: gSampleBoxHeight );
								view(align_children: align_left)
								{
									button(item_id: 'icon', name: gChoose, width: gButtonWidth);
									button(item_id: 'clar', name: gClear, width: gButtonWidth);
								}
							}
						}
					}
				}
			}
		}
	}
}
