gButtonSize = 34;

gMainListBoxHeight = gEditTextHeight * 6;
gMainListBoxWidth = max_char_width() * 22;
gHintBoxHeight = gStaticTextHeight * 3;

gSpelling	= '$$$/Prefs/Spelling';
gUnderline	= '$$$/Prefs/Spelling/Underline';
gColor		= '$$$/Prefs/Spelling/UnderlineColor';
gDictionaries = '$$$/Prefs/Spelling/Dictionaries';

H_TIP_ICON = 32;
W_TIP_ICON = 32;

dialog(name: gSpelling, margin_height: 0, margin_width: 0)
{
	view(align_children: align_left, dheight: gPrefsPanelHeight, dwidth: gPrefsPanelWidth)
	{
		cluster(item_id: 'spcl', name: gSpelling, dwidth: gPrefsPanelWidth, align_children: align_left)
		{
			check_box(item_id: 'box1', name: gUnderline);
			view(align_children: align_row) {
				gap(width: 10);
				static_text(item_id: 'txt1', name: gColor);
				button(item_id: 'ucol', picture: true, height: 20, width: 22);
			}
		}
		cluster(item_id: 'dicl', name: gDictionaries, dwidth: gPrefsPanelWidth, align_children: align_left)
		{
			view(align_children: align_top)
			{
				list_box(item_id: 'main', width: gMainListBoxWidth, height: gMainListBoxHeight);
				view(align_children: align_center)
				{
					button(item_id: 'ubut', width: gButtonSize, height: gButtonSize, picture: true);
					button(item_id: 'dbut', width: gButtonSize, height: gButtonSize, picture: true);
				}
			}
			view(align_children: align_top)
			{
				button(item_id: 'addD', name: '$$$/Prefs/Spelling/AddDictionary');
				button(item_id: 'remv', name: '$$$/Prefs/Spelling/RemoveDictionary');
			}
		}
		cluster(item_id: 'hicl', dwidth: gPrefsPanelWidth, dheight: 60, align_children: align_row)
		{
			view(align_children: align_top, alignment: align_fill)
			{
				picture(item_id: 'hpic', height: H_TIP_ICON, width: W_TIP_ICON);
				static_text(item_id: 'hint', alignment: align_fill );
			}
		}
	}
}
