vbox : (flex = '1' margin = '6 6 0 0') :
{
	hbox : (flex = '1') :
	{
		vbox : (flex = '1' size = '133') :
		{
			hbox : (size = '17') :
			{
				sw-bar : (delayed = '1' text = '^9664' text2 = '^9654' textSize = '8 8' textFont = 'symbol' onClick = [[set ui/v_comment.hidden '^']])
				: (flex = '1' next = '1'corner = '15' radius = '3') : (hint = 'Toggle Note')
				bn-ic : (onClick = 'i_pal open [[$/palette/pal0.png]]' text = '0' textFont = 'std' textSize = '6.5 6.5' delayed = '0') : (flex = '1') : (hint = 'Default Palette 0')
				bn-ic : (onClick = 'i_pal open [[$/palette/pal1.png]]' text = '1' textFont = 'std' textSize = '6.5 6.5' delayed = '0') : (flex = '1') : (hint = 'Default Palette 1')
				bn-ic : (onClick = 'i_pal open [[$/palette/pal2.png]]' text = '2' textFont = 'std' textSize = '6.5 6.5' delayed = '0') : (flex = '1') : (hint = 'Default Palette 2')
				bn-ic : (onClick = 'i_pal open [[$/palette/pal3.png]]' text = '3' textFont = 'std' textSize = '6.5 6.5' delayed = '0') : (flex = '1') : (hint = 'Default Palette 3')
			}

			vbox : (id = 'l_pal' flex = '1') :
			{
				palette : (id = 'pal' menu = 'popup_pal' onSelect = 'index' onMulti = 'pal_sel sel' onSwap = 'pal swap' onCopy = 'pal set' onGroup = 'pal grad')
				 : (flex = '1' size = '250')
				 : (hint = 'Swap [CTRL] : Gradient [CTRL+ALT] : Pick Screen Color [ALT]')
			}

			hbox : (size = '22') :
			{
				bn-ic : (delayed = '1' textFont = 'icon' text = '^47'  textSize = '14 14' onClick = 'i_pal sel'	) : (flex = '1') : (hint = 'Open Palette [Drop]')
				bn-ic : (delayed = '1' textFont = 'icon' text = '^44'  textSize = '14 14' onClick = 'o_pal'		) : (flex = '1') : (hint = 'Save Palette')
				bn-ic : (delayed = '9' textFont = 'icon' text = '^45'  textSize = '15 15' onClick = 'pal fill 75') : (flex = '1') : (hint = 'New Palette')
				bn-ic : (delayed = '0' textFont = 'icon' text = '^x24'  textSize = '14 14' onClick = 'pal_sel copy_region') : (flex = '1') : (hint = 'Copy Palette Region')
				bn-ic : (delayed = '0' textFont = 'icon' text = '^x23'  textSize = '15 15' onClick = 'pal paste_region') : (flex = '1') : (hint = 'Paste Palette Region')
			}
		}
	}

	//----------------
	// Color
	//----------------
	hbox : (size = '30') :
	{
		sw-h2 : (view = [['pal_col_box' 'col_pal_col_box']] selected = '0' text = 'Color' path = '1 1' flex = '4')
	}

	vbox :
	{
		rgbBox : (id = 'pal_col_box' onChange = 'rgb' size = '100' hidden = '1') :
		{
			vbox :
			{
				hbox : (bgColor = '0 0 0' corner = '15' radius = '3' flex = '1') :
				{
					group : (size = '20'):
					{
						sw-col
						 : (onClick = [[set ui/p_l_hsv.hidden '^' | set ui/p_l_rgb.hidden '^' | set ui/p_s_hsv.hidden '^' | set ui/p_s_rgb.hidden '^']])
						 : (selected = '1' corner = '5' radius = '3')

						 : (hint = 'Switch between HSV/RGB Color Picker')

						vbox : (id = 'p_l_hsv') :
						{
							label : (text = 'H' textSize = '7 7' collid = '0'  flex = '1' next = '1')
							label : (text = 'S' textSize = '7 7' collid = '0'  flex = '1' next = '1')
							label : (text = 'V' textSize = '7 7' collid = '0'  flex = '1' next = '0')
						}

						vbox : (id = 'p_l_rgb' hidden = '1') :
						{
							label : (text = 'R' textSize = '7 7' collid = '0' flex = '1' next = '1')
							label : (text = 'G' textSize = '7 7' collid = '0' flex = '1' next = '1')
							label : (text = 'B' textSize = '7 7' collid = '0' flex = '1' next = '0')
						}
					}
						
					hbox : (margin = '1 1 1 1' flex = '1') :
					{
						hbox : (id = 'p_s_hsv') : (flex = '1') :
						{
							vbox : (id = 'p_hsv' hidden = '1' flex = '1') :
							{
								sl-col : (id = '_hsq' range = '0 359' dir = '0' curColor = '0 0 0' size = '22') : (hint = 'Hue')
								layer : (flex = '1' prev = '1') : (hint = 'Saturation and Value') :
								{
									slider2d : (subclass = 'col') : (id = '_sv' range = '0 255' curColor = '128 128 128')
								}
							}
							vbox : (id = 'p_hdq') : (flex = '1') :
							{
								sl-col : (id = '_h' range = '0 359') : (flex = '1' next = '1') : (hint = 'Hue')
								sl-col : (id = '_s' range = '0 255') : (flex = '1' next = '1') : (hint = 'Saturation')
								sl-col : (id = '_v' range = '0 255') : (flex = '1') : (hint = 'Value')
							}
							
							vbox : (id = 'p_t_hsv' size = '33' hidden = '1')  :
							{
								vbox : (id = 'p_t_hsv_v' flex = '1') :
								{
									hbox : (flex = '1' next = '1') : (hint = 'Hue') :
									{
										tf-col : (id = '_h') : (flex = '1' size = '24')
										res-i-col : (range = '0 359' mod = '1')
									}
									hbox : (flex = '1' next = '1') : (hint = 'Saturation') :
									{
										tf-col : (id = '_s') : (flex = '1' size = '24')
										res-i-col : (range = '0 255')
									}
									hbox : (flex = '1') : (hint = 'Value') :
									{
										tf-col : (id = '_v') : (flex = '1' size = '24')
										res-i-col : (range = '0 255')
									}
								}
							}	
							vbox : (id = 'p_t_hsv_d' size = '6' prev = '1') :
							{
								res-i-dcol : (onChange = 'pal_add h' mod = '1' range = '0 359' flex = '1' next = '1') : (hint = 'Change Hue')
								res-i-dcol : (onChange = 'pal_add s' flex = '1' next = '1') : (hint = 'Change Saturation')
								res-i-dcol : (onChange = 'pal_add v' flex = '1') : (hint = 'Change Value')
							}
						}
			
						hbox : (id = 'p_s_rgb' hidden = '1') : (flex = '1') :
						{
							vbox : (id = 'p_hdq') : (flex = '1') :
							{
								sl-col : (id = '_r' range = '0 255') : (flex = '1' next = '1') : (hint = 'Red')
								sl-col : (id = '_g' range = '0 255') : (flex = '1' next = '1') : (hint = 'Green')
								sl-col : (id = '_b' range = '0 255') : (flex = '1') : (hint = 'Blue')
							}
							vbox : (id = 'p_t_rgb' size = '33' hidden = '1') :
							{
								vbox : (id = 'p_t_rgb_v' flex = '1') :
								{
									hbox : (flex = '1' next = '1') : (hint = 'Red') :
									{
										tf-col : (id = '_r') : (flex = '1' size = '24')
										res-i-col : (range = '0 255')
									}
									hbox : (flex = '1' next = '1') : (hint = 'Green') :
									{
										tf-col : (id = '_g') : (flex = '1' size = '24')
										res-i-col : (range = '0 255')
									}
									hbox : (flex = '1') : (hint = 'Blue') :
									{
										tf-col : (id = '_b') : (flex = '1' size = '24')
										res-i-col : (range = '0 255')
									}
								}								
							}
							vbox : (id = 'p_t_rgb_d' size = '6' prev = '1') :
							{
								res-i-dcol : (onChange = 'pal_add r' flex = '1' next = '1') : (hint = 'Change Red')
								res-i-dcol : (onChange = 'pal_add g' flex = '1' next = '1') : (hint = 'Change Green')
								res-i-dcol : (onChange = 'pal_add b' flex = '1') : (hint = 'Change Blue')
							}
						}

						vbox : (size = '16') :
						{
							sw-colpanel : (text = '^x2261'  textFont = 'symbol' textSize = '12 18' onClick = [[set ui/p_t_hsv.hidden '^' | set ui/p_t_rgb.hidden '^' | set ui/p_t_rgb_d.hidden '^' | set ui/p_t_hsv_d.hidden '^']]) : (flex = '1' next = '1') : (hint = 'Show Values')
							sp : (flex = '1')
							sw-colpanel : (text = '^x25cf' textFont = 'symbol' onClick = [[set ui/p_hdq.hidden '^' | set ui/p_hsv.hidden '^']]) : (flex = '1' prev = '1') : (hint = 'Show SV Block')
						}
					}
				}

				hbox : (size = '22' prev = '3' next = '3') : (bgColor = '10 10 10' corner = '15' radius = '3') :
				{		
					//bn-ic : (delayed = '0' textFont = 'icon' text = '^51' textSize = '14 14' onClick = 'pal_sel copy') : (size = '20') : (hint = 'Copy Color Code')
					//bn-ic : (delayed = '0' textFont = 'icon' text = '^52' textSize = '14 14' onClick = 'pal paste'   ) : (size = '20') : (hint = 'Paste Color Code')

					colpick : (id = 'pal_col' menu = '' onChange = 'pal rgb' border = '0') : (size = '22' corner = '15' radius = '2' margin = '3 3 3 3') : (hint = 'Pick Color from Screen [Drag]')

					group : (id = 'p_rgb' flex = '1') :
					{
						tf-col : (id = '_rgb' maxLength = '12' textSize = '6.5 6.5') : (hint = 'RGB Values')
					}
					group : (id = 'p_hex' flex = '1' hidden = '1') :
					{
						tf-col : (id = '_hex' maxLength = '12' textSize = '6.5 6.5') : (hint = 'HEX Values')
					}
					
					sw-colpanel : (text = '^8644' textFont = 'symbol' textSize = '13 13') : (size = '16' next = '1') : (hint = 'Show HEX Values')
					 : (onClick = [[set ui/p_rgb.hidden '^' | set ui/p_hex.hidden '^']])
				}				
			}				
		}
	}
}
