vbox(margin = '4 4 0 0') ::
{
	vbox(id = 'menu_model')(flex = '1') ::
	{
		switch(class = 'panel')(def='h2' selected = '1' text = 'Project' size = '28')
		
		layer(def = 'layer-dark')(flex = '1') ::
		{
			list(def = 'fileList' id = 'file' root = [[$/vox]] ext = "vox" onSelect = 'open')(hint = 'Project List')
		}
	}

	vbox(id = 'menu_patt' flex = '1' hidden = '1') ::
	{
		hbox(size = '28') ::
		{
			switch(class = 'panel')(def='h2' path = '1 1' selected = '1' text = 'Pattern' flex = '1')

			button(def = 'bn-ic' onClick = 'onewpatt' text = '^10' textFont = 'icon' textSize = '14 14' delayed = '1')(size = '23' margin = '0 0 3 3')
			(hint = 'Add Pattern in the Scene')
		
			button(def = 'bn-ic' text = '^73' textFont = 'icon' textSize = '14 14' onClick = 's_patt 1')(size = '23' margin = '0 0 3 3')
			(hint = 'Create Reference Patterns from Selected Objects')
		
			button(def = 'bn-ic' text = '^12' textFont = 'icon' textSize = '14 14' onClick = 's_patt')(size = '23' margin = '0 0 3 3')
			(hint = 'Create Patterns from Selected Voxels/Objects')
		}
				
		layer(def = 'layer-dark' bgColor = '70 70 70 0' scroll = '0 1' resize = '4')(size = '200' max = '400' flex = '-1') ::
		{
			preview(id = 'preview' flex = '1' margin = '6 6 0 0')(hint = 'Pattern Preview : Drag and Drop')
		}

		hbox(size = '28' clip = '0')(hint = 'Pattern Library') ::
		{
			switch(class = 'panel')(def='h2' path = '1 1' selected = '1' text = 'Library')(flex = '1')
		
			button(onClick = 'i_patt' def = 'bn-ic' text = '^47' textSize = '14 14')(size = '23' margin = '0 0 3 3')(hint = 'Open Pattern')
			
			switch(def = 'sw-sub' onClick = 'set option_import patt_match' text = 'Match' textSize = '6.5 6.5' selected = '1')
			(size = '46' margin = '0 0 3 3')(hint = 'Match Palette Color')
		}
	
		layer(def = 'layer-dark')(flex = '1') ::
		{
			list(def = 'fileList' id = 'file_patt' root = [[$/vox]] ext = 'vox' onSelect = 'i_patt')(hint = 'Pattern Library')
		}
	}

	vbox(id = 'menu_shader' flex = '1' hidden = '1') ::
	{
		hbox(clip = '0' size = '28') ::
		{
			switch(class = 'panel')(def='h2' selected = '1' path = '1 1' text = 'Argument' flex = '1' next = '3')

			button(def = 'bn-ic' onClick = 'i_comp arg' textFont = 'icon' text = '^33' textSize = '14 14' delayed = '1')(size = '25' margin = '0 0 3 3')(hint = 'Import Args')
			button(def = 'bn-ic' onClick = 'o_comp arg' textFont = 'icon' text = '^34' textSize = '14 14' delayed = '1')(size = '25' margin = '0 0 3 3')(hint = 'Export Args')
		} 
		
		layer(def = 'layer-dark')(bgColor = '70 70 70 0' scroll = '0 1' resize = '4' size = '125' max = '250' flex = '-1') ::
		{
			vbox(margin = '9 6 0 0')(id = 'xs' masked = '1')(hint = 'Shader Arguments') ::
			{
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 0' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 1' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 2' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 3' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 4' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 5' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 6' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 7' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 8' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 9' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 10' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 11' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 12' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 13' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 14' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
				hbox(size = '28') ::
				{
					label(def = 'h3' id = 'name' text = 'Arg')(flex = '1' next = '6') textField(def = 'tf-n' id = 'value' onEnter = 'set xs_arg 15' )	(flex = '1' next = '3')
					resizer(class = 'float')(id = 'set' range = '0 1.0' step = '1' space = '7')(size = '8')
				}
			}
		}

		hbox(size = '28') ::
		{
			switch(class = 'panel')(def='h2' selected = '1' path = '1 1' text = 'Shader' size = '50')
			textField(def = 'tf-sub' id = 'xs_iter' onEnter = 'set xs_iter' text = '1' maxLength = '2')(size = '15')(hint = 'Iteration Number')
			resizer(class = 'int')(range = '1 64' step = '1' space = '4')(size = '8' prev = '3')
			sp(flex = '1')
			button(def = 'bn-ic' text = '^42' textFont = 'icon' onClick = 'xs'            delayed = '1' textSize = '10 10')(size = '25' margin = '0 0 3 3')(hint = 'Execute Shader')
			button(def = 'bn-ic' text = '^38' textFont = 'icon' onClick = 'set xs_shader' delayed = '1' textSize = '12 12')(size = '25' margin = '0 0 3 3')(hint = 'Refresh Shader')
		}		

		layer(def = 'layer-dark')(flex = '1') ::
		{
			list(def = 'fileList' id = 'file_xs' root = [[$/shader]] ext = 'txt' onSelect = 'set xs_shader')(hint = 'Voxel Shader List')
		}
	}

	vbox(id = 'menu_graph' flex = '1' hidden = '1') ::
	{
		hbox(size = '28') ::
		{
			switch(class = 'panel')(def='h2' path = '1 1' selected = '1' text = 'Outline' flex = '1' next = '2')
		}

		vbox ::
		{
			hbox(size = '22' next = '3') ::
			{
				button(def = 'bn-ic' delayed = '0' onClick = 'onew' textFont = 'icon' text = '^10' textSize = '13 13')(flex = '1')(hint = 'New Object [CTRL+N]')
				button(def = 'bn-ic' delayed = '0' onClick = 'odel' textFont = 'icon' text = '^11' textSize = '13 13')(flex = '1')(hint = 'Delete Objects [Backspace/Delete]')
				button(def = 'bn-ic' delayed = '0' onClick = 'ogroup'   textFont = 'icon' text = '^19' textSize = '13 13')(flex =  '1' next = '1')(hint = 'Group Objects [CTRL+R]')
				button(def = 'bn-ic' delayed = '0' onClick = 'oungroup' textFont = 'icon' text = '^18' textSize = '13 13')(flex =  '1' next = '0')(hint = 'Ungroup Objects [CTRL+SHIFT+R]')
				button(class = 'alt-cmd')(def = 'bn-ic' delayed = '0' onClick = 'order  1' onClick1 = 'order  2' text = '^x2191' textFont = 'symbol' textSize = '12 12' repeated = '1')(flex = '1')(hint = 'Move Forward : Bring To First [+SHIFT]')
				button(class = 'alt-cmd')(def = 'bn-ic' delayed = '0' onClick = 'order -1' onClick1 = 'order -2' text = '^x2193' textFont = 'symbol' textSize = '12 12' repeated = '1')(flex = '1')(hint = 'Move Backward : Bring To Last [+SHIFT]')
				button(def = 'bn-ic' delayed = '0' onClick = 'olevel -1' text = '^X25b3' textFont = 'symbol' textSize = '12 12')(flex =  '1')(hint = 'Leave Object [SHIFT+TAB]')
				button(def = 'bn-ic' delayed = '0' onClick = 'olevel +1' text = '^X25bd' textFont = 'symbol' textSize = '12 12')(flex =  '1')(hint = 'Enter Object [TAB]')
			}
		}

		layer(def = 'layer-dark')(flex = '1') ::
		{
			graph(id = 'graph' menu = 'menu_outline' )(hint = 'Scene : Enter [Double Click] : Multi-Select [CTRL/SHIFT] : Menu [RButton]')
		}
	}

	layer(fitSize ='1 0' scroll = '0 1')(flex = '1')(id = 'menu_io' flex = '1' hidden = '1') ::
	{
		vbox(margin = '9 6 0 0' clip = '0') ::
		{	
			hbox(clip = '0' size = '28' margin = '-9 -2 0 0') ::
			{
				switch(class = 'panel')(def='h2' selected = '1' path = '1 1' text = 'File')( flex = '1')
			}

			vbox ::
			{
				hbox(size = '28')(hint = 'Palette') ::
				{
					label(def = 'h3' text = 'Palette')(flex = '1')
					button(def = 'bn-ic'  onClick = 'i_pal sel' text = '^33' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Import')
					button(def = 'bn-ic'  onClick = 'o_pal' text = '^34' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Export')
					switch(def = 'sw-check' onClick = 'set option_save pal' selected = '1')(prev = '3' size = '16')(hint = 'Save in the File')
				}
				hbox(size = '28')(hint = 'Material') ::
				{
					label(def = 'h3' text = 'Material')(flex = '1')
					button(def = 'bn-ic'  onClick = 'i_comp mtl' text = '^33' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Import')
					button(def = 'bn-ic'  onClick = 'o_comp mtl' text = '^34' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Export')
					switch(def = 'sw-check' onClick = 'set option_save mtl' selected = '1')(prev = '3' size = '16')(hint = 'Save in the File')
				}
				hbox(size = '28')(hint = 'Render Setting') ::
				{
					label(def = 'h3' text = 'Render')(flex = '1')
					button(def = 'bn-ic'  onClick = 'i_comp render' text = '^33' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Import')
					button(def = 'bn-ic'  onClick = 'o_comp render' text = '^34' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Export')
					switch(def = 'sw-check' onClick = 'set option_save render' selected = '1')(prev = '3' size = '16')(hint = 'Save in the File')
				}
				hbox(size = '28')(hint = 'Camera') ::
				{
					label(def = 'h3' text = 'Camera')(flex = '1')
					button(def = 'bn-ic'  onClick = 'i_comp camera' text = '^33' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Import')
					button(def = 'bn-ic'  onClick = 'o_comp camera' text = '^34' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Export')
					switch(def = 'sw-check' onClick = 'set option_save camera' selected = '1')(prev = '3' size = '16')(hint = 'Save in the File')
				}	
				hbox(size = '28')(hint = 'Palette Note') ::
				{
					label(def = 'h3' text = 'Note')(flex = '1')
					button(def = 'bn-ic'  onClick = 'i_comp note' text = '^33' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Import')
					button(def = 'bn-ic'  onClick = 'o_comp note' text = '^34' textSize = '14 14')(size = '20' margin = '0 0 4 4')(hint = 'Export')
					switch(def = 'sw-check' onClick = 'set option_save note' selected = '1')(prev = '3' size = '16')(hint = 'Save in the File')
				}			
			}
			
			hbox(clip = '0' size = '28' margin = '-9 -2 0 0') ::
			{
				switch(class = 'panel')(def='h2' selected = '1' path = '1 1' text = 'Import')( flex = '1')
				button(onClick = 'i' def = 'bn-ic' text = '^47' textSize = '14 14')(size = '20' margin = '-2 -2 4 4')(hint = 'Import Project [Drop]')
			}			
			vbox ::
			{
				hbox(size = '28')(hint = 'Only Import Color and Material for Selected Palette Region') ::
				{
					label(def = 'h3' text = 'Selected Color')(flex = '1')
					switch(def = 'sw-check' onClick = 'set option_import pal_sel' selected = '0')(size = '16')
				}
				hbox(size = '28')(hint = 'Match Palette Color') ::
				{
					label(def = 'h3' text = 'Match Color')(flex = '1')
					switch(def = 'sw-check' onClick = 'set option_import match' selected = '1')(size = '16')
				}
			}

			hbox(clip = '0' size = '28' margin = '-9 -2 0 0') ::
			{
				switch(class = 'panel')(def='h2' selected = '1' path = '1 1' text = 'Export')( flex = '1')
				button(onClick = 'o' def = 'bn-ic' text = '^47' textSize = '14 14')(size = '20' margin = '-2 -2 4 4')(hint = 'Export Project')
			}
			vbox ::
			{
				hbox(size = '28')(hint = 'Only Export Selected Objects') ::
				{
					label(def = 'h3' text = 'Selection Only')(flex = '1')
					switch(def = 'sw-check' onClick = 'set option_export sel' selected = '0')(size = '16')
				}

				hbox(size = '28')(hint = 'Export Objects in the Local Space') ::
				{
					label(def = 'h3' text = 'Local Space')(flex = '1')
					switch(def = 'sw-check' onClick = 'set option_export local' selected = '0')(size = '16')
				}
			}
		}
	}

	//----------------
	// Export
	//----------------
	vbox(def = 'bg') ::
	{
		switch(class = 'panel')(def='h2' selected = '0' text = 'Export' size = '28')
		vbox ::
		{
			hbox(size = '28' next = '1') ::
			{
				button(onClick = 'o obj'	text = 'obj'	delayed = '1' 	)(flex = '1' next = '1')(corner = '4')(hint = 'obj : obj mesh')
				button(onClick = 'o ply'	text = 'ply'	delayed = '1' 	)(flex = '1' next = '1')(corner = '0')(hint = 'ply : ply mesh')
				button(onClick = 'o mc'		text = 'mc'		delayed = '1' 	)(flex = '1' next = '0')(corner = '8')(hint = 'mc : Marching Cubes')
			}
			hbox(size = '28' next = '1') ::
			{
				button(onClick = 'o xraw'   text = 'xraw'	delayed = '1' 	)(flex = '1' next = '1')(hint = 'vox : xraw volume')
				button(onClick = 'o slab'	text = 'slab'	delayed = '1' 	)(flex = '1' next = '1')(hint = 'slab : slab6 vox volume')
				button(onClick = 'o qb'		text = 'qb'		delayed = '1' 	)(flex = '1' next = '0')(hint = 'qb : qb volume')
			}
			hbox(size = '28' next = '1') ::
			{
				button(onClick = 'o vox'	text = 'vox'	delayed = '1' 	)(flex = '1' next = '1')(hint = 'vox : vox voxels')
				button(onClick = 'o iso'	text = 'iso'	delayed = '1' 	)(flex = '1' next = '1')(hint = 'iso : isometric pixel sprite')
				button(onClick = 'o 2d'		text = '2d'		delayed = '1' 	)(flex = '1' next = '0')(hint = '2d : 2D sprite')
			}
			hbox(size = '28') ::
			{
				button(onClick = 'o slice'	text = 'slice'	delayed = '1' 	)(flex = '1' next = '1')(corner = '1')(hint = 'slice : slices')
				button(onClick = 'o pcl'	text = 'point'	delayed = '1' 	)(flex = '1' next = '1')(corner = '0')(hint = 'point : point clouds')
				button(onClick = 'o cube'	text = 'cube'	delayed = '1' 	)(flex = '1' next = '0')(corner = '2')(hint = 'cube : cubes')
			}
		}
	}
}