# Automatically generated PSI dialog (PSI version 2.0)
# Fri Jun 30 22:58:01 EDT 1995
#
# Then hand edited so that:
# - there are enable buttons and radio buttons for the
#   number/bounding/normal/edges sections
# - the combine section is extensively reworked.


SF_SIZES 0 0.3 2;

group.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(group.val) STRETCH(1,0);
    group.menu VALUE(group.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


crname.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group Name") SIZE (1.5, 0)}
    FIELD string VALUE(crname.val) STRETCH(1,0);
}


grouptype.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group Type") SIZE(1.5, 0)}
    grouptype.menu VALUE(grouptype.menuval)
		LOOKTEXT(select, grouptype.menuval) STRETCH(1, 0);
}


geotype.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Geometry Type") SIZE(1.5, 0)}
    geotype.menu VALUE(geotype.menuval)
		LOOKTEXT(select, geotype.menuval) STRETCH(1, 0);
}


groupop.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Operation") SIZE(1.5, 0)}
    groupop.menu VALUE(groupop.menuval)
		LOOKTEXT(select, groupop.menuval) STRETCH(1, 0);
}



pattern.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Pattern") SIZE (1.5, 0)}
    FIELD string VALUE(pattern.val) STRETCH(1,0);
}


start.chmenu = SWITCHER
{
    LOOK(plain) VALUE(start.jive)

    BUTTON push SENDS(4) HELP("Channel Button (click to add channels)") VALUE(start.jive)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) HELP("Channel Button (click to edit channels, alt-click to delete them)") VALUE(start.jive)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

start.gad =
{
    LAYOUT(horizontal!) STRETCH(1, 0)

    { LOOKTEXT(plain, "Start/End") SIZE (1.5, 0)}
    VECTORFIELD(2) integer VALUE(start.val) STRETCH(1, 0);
    start.chmenu;
}


inc.chmenu = SWITCHER
{
    LOOK(plain) VALUE(inc.jive)

    BUTTON push SENDS(4) HELP("Channel Button (click to add channels)") VALUE(inc.jive)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) HELP("Channel Button (click to edit channels, alt-click to delete them)") VALUE(inc.jive)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

inc.gad =
{
    LAYOUT(horizontal!) STRETCH(1, 0)

    { LOOKTEXT(plain, "Every _ of _") SIZE (1.5, 0)}
    VECTORFIELD(2) integer VALUE(inc.val) STRETCH(1, 0);
    inc.chmenu;
}


boundtype.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Bounding Type") SIZE(1.5, 0)}
    boundtype.menu VALUE(boundtype.menuval)
		LOOKTEXT(select, boundtype.menuval) STRETCH(1, 0);
}


t.chmenu = SWITCHER
{
    LOOK(plain) VALUE(t.jive)

    BUTTON push SENDS(4) HELP("Channel Button (click to add channels)") VALUE(t.jive)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) HELP("Channel Button (click to edit channels, alt-click to delete them)") VALUE(t.jive)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

t.gad =
{
    LAYOUT(horizontal!) STRETCH(1, 0)

    { LOOKTEXT(plain, "Center") SIZE (1.5, 0)}
    VECTORFIELD(3) float VALUE(t.val) STRETCH(1, 0);
    t.chmenu;
}


size.chmenu = SWITCHER
{
    LOOK(plain) VALUE(size.jive)

    BUTTON push SENDS(4) HELP("Channel Button (click to add channels)") VALUE(size.jive)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) HELP("Channel Button (click to edit channels, alt-click to delete them)") VALUE(size.jive)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

size.gad =
{
    LAYOUT(horizontal!) STRETCH(1, 0)

    { LOOKTEXT(plain, "Size") SIZE (1.5, 0)}
    VECTORFIELD(3) float VALUE(size.val) STRETCH(1, 0);
    size.chmenu;
}


dir.chmenu = SWITCHER
{
    LOOK(plain) VALUE(dir.jive)

    BUTTON push SENDS(4) HELP("Channel Button (click to add channels)") VALUE(dir.jive)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) HELP("Channel Button (click to edit channels, alt-click to delete them)") VALUE(dir.jive)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

dir.gad =
{
    LAYOUT(horizontal!) STRETCH(1, 0) MARGIN(0, 0.025)

    {
	LAYOUT(vertical!) STRETCH(1, 0)
	{
	    LAYOUT(horizontal) STRETCH(1, 0)
	    { LOOKTEXT(plain, "Direction") SIZE (1.5, 0)}
	    dir.chmenu;
	}
	VECTORFIELD(3) float VALUE(dir.val) STRETCH(1, 0);
    }
    POLAR VALUE(dir.val) LOOK(bevel);
}


angle.chmenu = SWITCHER
{
    LOOK(plain) VALUE(angle.jive)

    BUTTON push SENDS(4) HELP("Channel Button (click to add channels)") VALUE(angle.jive)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) HELP("Channel Button (click to edit channels, alt-click to delete them)") VALUE(angle.jive)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

angle.xcf = XCF floatarray VALUE(angle.val) FULLOVERLAY;

angle.gad =
{
    LAYOUT(horizontal!) STRETCH(1, 0)

    { LOOKTEXT(plain, "Spread Angle") SIZE (1.5, 0)}

    XCFPARENT angle.xcf center
    {
	LAYOUT(horizontal) STRETCH(1, 0) MARGIN(0, 0.1) LOOK(BANDH)
	VALUE(angle.val)
	{
	    LAYOUT(horizontal!) STRETCH(1,0)
	    FIELD float VALUE(angle.val) STRETCH(1, 0);
	    ANGLEJACK VALUE(angle.val);
	}
    }

    angle.chmenu;
}


edgeangle.chmenu = SWITCHER
{
    LOOK(plain) VALUE(edgeangle.jive)

    BUTTON push SENDS(4) HELP("Channel Button (click to add channels)") VALUE(edgeangle.jive)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) HELP("Channel Button (click to edit channels, alt-click to delete them)") VALUE(edgeangle.jive)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

edgeangle.xcf = XCF floatarray VALUE(edgeangle.val) FULLOVERLAY;

edgeangle.gad =
{
    LAYOUT(vertical!) STRETCH(1, 0)
    {
	LAYOUT(horizontal) STRETCH(1, 0)
	{ LOOKTEXT(plain, "Edge Angle") SIZE (1.5, 0)}
	edgeangle.chmenu;
    }

    XCFPARENT edgeangle.xcf center
    {
	LAYOUT(horizontal) STRETCH(1, 0) MARGIN(0, 0.1) LOOK(BANDH)
	VALUE(edgeangle.val)
	{
	    LAYOUT(horizontal!) STRETCH(1,0)
	    FIELD float VALUE(edgeangle.val) STRETCH(1, 0);
	    ANGLEJACK VALUE(edgeangle.val);
	}
    }
}



numedge.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Edge Depth") SIZE (1.5, 0)}
    SLIDERFIELD integer 0 10 VALUE(numedge.val) STRETCH(1,0);
}



point.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Point Number") SIZE (1.5, 0)}
    SLIDERFIELD integer 0 10 VALUE(point.val) STRETCH(1,0);
}



grpequal.gad = 
{
    LAYOUT(horizontal) SIZE(1.9, 0)

    FIELD string VALUE(grpequal.val) STRETCH(1,0);
    grpequal.menu VALUE(grpequal.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
    { LOOKTEXT(plain, "=")}
}


not1.gad = SWITCHER
{
    LOOK(plain) VALUE(not1.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not1.val) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not1.val) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}


grp1.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp1.val) STRETCH(1, 0);
    grp1.menu VALUE(grp1.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


op1.gad = 
    op1.menu VALUE(op1.menuval) LOOKTEXT(select, op1.menuval) SIZE(1.9, 0);


not2.gad = SWITCHER
{
    LOOK(plain) VALUE(not2.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not2.val) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not2.val) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}


grp2.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp2.val) STRETCH(1,0);
    grp2.menu VALUE(grp2.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


op2.gad = 
    op2.menu VALUE(op2.menuval) LOOKTEXT(select, op2.menuval) SIZE(1.9, 0);


not3.gad = SWITCHER
{
    LOOK(plain) VALUE(not3.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not3.val) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not3.val) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}


grp3.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp3.val) STRETCH(1,0);
    grp3.menu VALUE(grp3.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


op3.gad = 
    op3.menu VALUE(op3.menuval) LOOKTEXT(select, op3.menuval) SIZE(1.9, 0);


not4.gad = SWITCHER
{
    LOOK(plain) VALUE(not4.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not4.val) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not4.val) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}


grp4.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp4.val) STRETCH(1,0);
    grp4.menu VALUE(grp4.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


cnvtype.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Convert Type") SIZE(1.5, 0)}
    cnvtype.menu VALUE(cnvtype.menuval)
		LOOKTEXT(select, cnvtype.menuval) STRETCH(1, 0);
}



convertg.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(convertg.val) STRETCH(1,0);
    convertg.menu VALUE(convertg.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}



cnvtname.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Convert Name") SIZE (1.5, 0)}
    FIELD string VALUE(cnvtname.val) STRETCH(1,0);
}


preserve.gad = BUTTON toggle LOOKTEXT(check, "Preserve Original")
		VALUE(preserve.val) STRETCH(1, 0);



oldname.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(oldname.val) STRETCH(1,0);
    oldname.menu VALUE(oldname.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}



newname.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "New Name") SIZE (1.5, 0)}
    FIELD string VALUE(newname.val) STRETCH(1,0);
}



destroyname.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(destroyname.val) STRETCH(1,0);
    destroyname.menu VALUE(destroyname.menuval)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}



enable.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Enable") SIZE (1.5, 0)}
    SLIDERFIELD integer 0 10 VALUE(enable.val) STRETCH(1,0);
}



type.gad = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "group type") SIZE (1.5, 0)}
    SLIDERFIELD integer 0 10 VALUE(type.val) STRETCH(1,0);
}


switcher3.gad = 
{
    LAYOUT(vertical) STRETCH(1, 0)

    { LOOK(none) SIZE(0, 0.05) }	# Spacer

    {
	LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) SIZE(3.9, 0)

	{ LOOKTEXT(plain, "Convert:") }
	cnvtype.gad;
	convertg.gad;
	cnvtname.gad;
	preserve.gad;
    }

    { LOOK(underline) SIZE(3.9, 0.1) }
    { LOOK(none) SIZE(0, 0.05) }	# Spacer
    {
	LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) SIZE(3.9, 0)

	{ LOOKTEXT(plain, "Rename:") }
	oldname.gad;
	newname.gad;
    }

    { LOOK(underline) SIZE(3.9, 0.1) }
    { LOOK(none) SIZE(0, 0.05) }	# Spacer
    {
	LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) SIZE(3.9, 0)

	{ LOOKTEXT(plain, "Delete:") }
	destroyname.gad;
    }
}

buttons.gad =
{
    LAYOUT(vertical) MARGIN(0.05, 0)
    # WIDTH is 3.9 here, so the widths of the buttons below are
    # 3.9 - (2 * 0.05) - (3 * 0.04) = 3.9 - 0.1 - 0.12 = 3.68

    #switcher controller
    BUTTONSTRIP radio
    {
	LAYOUT(horizontal)  STRETCH(1, 0) MARGIN(0, 0.04) LOOK(plain)
	VALUE(switcher2.gad.val)

	BUTTON push LOOKTEXT(radio, "Number")	SIZE(3.68/4, 0);
	BUTTON push LOOKTEXT(radio, "Bounding")	SIZE(3.68/4, 0);
	BUTTON push LOOKTEXT(radio, "Normal")	SIZE(3.68/4, 0);
	BUTTON push LOOKTEXT(radio, "Edges")	SIZE(3.68/4, 0);
    }

    #page enable buttons
    BUTTONSTRIP bitmap
    {
        LAYOUT(horizontal) STRETCH(1, 0) MARGIN(0, 0.04) LOOK(plain)
	VALUE(enable.val) 

        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
    }
}

switcher2.gad = 
{
    LAYOUT(vertical) STRETCH(1, 0) MARGIN(0, 0) LOOK(line)
    # WIDTH is 3.9 here

    buttons.gad;

    SWITCHER
    {
	LOOK(line) STRETCH(1, 0) LAYOUT(overlap!) MARGIN(0.05, 0)
	VALUE(switcher2.gad.val)
	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    groupop.gad;
	    pattern.gad;
	    start.gad;
	    inc.gad;
	}

	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    boundtype.gad;
	    t.gad;
	    size.gad;
	}

	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    dir.gad;
	    angle.gad;
	}

	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    edgeangle.gad;
	    numedge.gad;
	    point.gad;
	}

    }
}

stdswitcher.gad = 
{
    LAYOUT(vertical) STRETCH(1, 0)
    #WIDTH is 4 here

    { LOOK(none) SIZE(0, 0.05) }	# Spacer

    BUTTONSTRIP radio
    {
	LAYOUT(horizontal!) MARGIN(0, 0.05) LOOK(whiteunderline) STRETCH(1, 0)
	VALUE(stdswitcher.gad.val)

	BUTTON push LAYOUT(horizontal!) LOOKTEXT(folder, "Create") STRETCH(1, 0);
	BUTTON push LAYOUT(horizontal!) LOOKTEXT(folder, "Combine") STRETCH(1, 0);
	BUTTON push LAYOUT(horizontal!) LOOKTEXT(folder, "Edit") STRETCH(1, 0);
    }
    {
	LAYOUT(vertical) LOOK(tabdialog) STRETCH(1, 0) MARGIN(0.05, 0)

	{ SIZE(0, 0.05) }

	SWITCHER
	{
	    LOOK(plain) MARGIN(0, 0) STRETCH(1, 0) LAYOUT(overlap!)
	    VALUE(stdswitcher.gad.val)
	    # WIDTH is 3.9 here
	    {
		LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

		crname.gad;
		grouptype.gad;
		geotype.gad;
		{ SIZE(0, 0.05) }
		switcher2.gad;
	    }

	    {
		LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    grpequal.gad; not1.gad; grp1.gad; }
		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    op1.gad; not2.gad; grp2.gad;}
		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    op2.gad; not3.gad; grp3.gad; }
		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    op3.gad; not4.gad; grp4.gad; }
	    }

	    {
		LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

		switcher3.gad;
	    }

	}
    }
}

dialog_norm.gad = 
{
    LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) LOOK(plain)
    { LOOK(underline) SIZE(4, 0.01) STRETCH(0, 0) }

    #group.gad;
    stdswitcher.gad;
    #enable.gad;
    #type.gad;
}



group.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(group.val.expr) STRETCH(1,0);
    group.menu.expr VALUE(group.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}



crname.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group Name") SIZE (1.5, 0)}
    FIELD string VALUE(crname.val.expr) STRETCH(1,0);
}


grouptype.gad.expr =
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group Type") SIZE(1.5, 0)}
    grouptype.menu.expr VALUE(grouptype.menuval.expr)
	     LOOKTEXT(select, grouptype.menuval.expr) STRETCH(1, 0);
}


geotype.gad.expr =
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Geometry Type") SIZE(1.5, 0)}
    geotype.menu.expr VALUE(geotype.menuval.expr)
	     LOOKTEXT(select, geotype.menuval.expr) STRETCH(1, 0);
}


groupop.gad.expr =
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Operation") SIZE(1.5, 0)}
    groupop.menu.expr VALUE(groupop.menuval.expr)
	     LOOKTEXT(select, groupop.menuval.expr) STRETCH(1, 0);
}



pattern.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Pattern") SIZE (1.5, 0)}
    FIELD string VALUE(pattern.val.expr) STRETCH(1,0);
}


start.chmenu.expr = SWITCHER
{
    LOOK(plain) VALUE(start.jive.expr)

    BUTTON push SENDS(0) VALUE(start.jive.expr)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) VALUE(start.jive.expr)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

start.gad.expr =
{
    LAYOUT(vertical!) STRETCH(1, 0)

    {
	LAYOUT(horizontal!) STRETCH(1, 0)

	{ LOOKTEXT(plain, "Start/End") STRETCH(1, 0)}
	start.chmenu.expr;
    }

    VECTORFIELD(2) string VALUE(start.val.expr) STRETCH(1, 0)
	    LAYOUT(horizontal!);
}


inc.chmenu.expr = SWITCHER
{
    LOOK(plain) VALUE(inc.jive.expr)

    BUTTON push SENDS(0) VALUE(inc.jive.expr)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) VALUE(inc.jive.expr)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

inc.gad.expr =
{
    LAYOUT(vertical!) STRETCH(1, 0)

    {
	LAYOUT(horizontal!) STRETCH(1, 0)

	{ LOOKTEXT(plain, "Every _ of _") STRETCH(1, 0)}
	inc.chmenu.expr;
    }

    VECTORFIELD(2) string VALUE(inc.val.expr) STRETCH(1, 0)
	    LAYOUT(horizontal!);
}


boundtype.gad.expr =
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Bounding Type") SIZE(1.5, 0)}
    boundtype.menu.expr VALUE(boundtype.menuval.expr)
	     LOOKTEXT(select, boundtype.menuval.expr) STRETCH(1, 0);
}


t.chmenu.expr = SWITCHER
{
    LOOK(plain) VALUE(t.jive.expr)

    BUTTON push SENDS(0) VALUE(t.jive.expr)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) VALUE(t.jive.expr)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

t.gad.expr =
{
    LAYOUT(vertical!) STRETCH(1, 0)

    {
	LAYOUT(horizontal!) STRETCH(1, 0)

	{ LOOKTEXT(plain, "Center") STRETCH(1, 0)}
	t.chmenu.expr;
    }

    VECTORFIELD(3) string VALUE(t.val.expr) STRETCH(1, 0)
	    LAYOUT(horizontal!);
}


size.chmenu.expr = SWITCHER
{
    LOOK(plain) VALUE(size.jive.expr)

    BUTTON push SENDS(0) VALUE(size.jive.expr)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) VALUE(size.jive.expr)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

size.gad.expr =
{
    LAYOUT(vertical!) STRETCH(1, 0)

    {
	LAYOUT(horizontal!) STRETCH(1, 0)

	{ LOOKTEXT(plain, "Size") STRETCH(1, 0)}
	size.chmenu.expr;
    }

    VECTORFIELD(3) string VALUE(size.val.expr) STRETCH(1, 0)
	    LAYOUT(horizontal!);
}


dir.chmenu.expr = SWITCHER
{
    LOOK(plain) VALUE(dir.jive.expr)

    BUTTON push SENDS(0) VALUE(dir.jive.expr)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) VALUE(dir.jive.expr)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

dir.gad.expr =
{
    LAYOUT(vertical!) STRETCH(1, 0)

    {
	LAYOUT(horizontal!) STRETCH(1, 0)

	{ LOOKTEXT(plain, "Direction") STRETCH(1, 0)}
	dir.chmenu.expr;
    }

    VECTORFIELD(3) string VALUE(dir.val.expr) STRETCH(1, 0)
	    LAYOUT(horizontal!);
}


angle.chmenu.expr = SWITCHER
{
    LOOK(plain) VALUE(angle.jive.expr)

    BUTTON push SENDS(0) VALUE(angle.jive.expr)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) VALUE(angle.jive.expr)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

angle.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Spread Angle") SIZE (1.5, 0)}
    FIELD string VALUE(angle.val.expr) STRETCH(1,0);
    angle.chmenu.expr;
}


edgeangle.chmenu.expr = SWITCHER
{
    LOOK(plain) VALUE(edgeangle.jive.expr)

    BUTTON push SENDS(0) VALUE(edgeangle.jive.expr)
	    LOOKICON(PSI_ChannelNone, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(1) VALUE(edgeangle.jive.expr)
	    LOOKICON(PSI_Channel, bevel) SIZE(0.245, 0.245);
}

edgeangle.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Edge Angle") SIZE (1.5, 0)}
    FIELD string VALUE(edgeangle.val.expr) STRETCH(1,0);
    edgeangle.chmenu.expr;
}



numedge.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Edge Depth") SIZE (1.5, 0)}
    FIELD string VALUE(numedge.val.expr) STRETCH(1,0);
}



point.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Point Number") SIZE (1.5, 0)}
    FIELD string VALUE(point.val.expr) STRETCH(1,0);
}



grpequal.gad.expr = 
{
    LAYOUT(horizontal) SIZE(1.9, 0)

    FIELD string VALUE(grpequal.val.expr) STRETCH(1,0);
    grpequal.menu.expr VALUE(grpequal.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
    { LOOKTEXT(plain, "=")}
}


not1.gad.expr = SWITCHER
{
    LOOK(plain) VALUE(not1.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not1.val.expr) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not1.val.expr) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}

grp1.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp1.val) STRETCH(1, 0);
    grp1.menu.expr VALUE(grp1.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


op1.gad.expr = op1.menu.expr VALUE(op1.menuval.expr)
		LOOKTEXT(select, op1.menuval.expr) SIZE(1.9, 0);


not2.gad.expr = SWITCHER
{
    LOOK(plain) VALUE(not2.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not2.val.expr) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not2.val.expr) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}



grp2.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp2.val) STRETCH(1, 0);
    grp2.menu.expr VALUE(grp2.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


op2.gad.expr = op2.menu.expr VALUE(op2.menuval.expr)
		LOOKTEXT(select, op2.menuval.expr) SIZE(1.9, 0);


not3.gad.expr = SWITCHER
{
    LOOK(plain) VALUE(not3.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not3.val.expr) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not3.val.expr) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}


grp3.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp3.val) STRETCH(1, 0);
    grp3.menu.expr VALUE(grp3.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


op3.gad.expr = op3.menu.expr VALUE(op3.menuval.expr)
		LOOKTEXT(select, op3.menuval.expr) SIZE(1.9, 0);


not4.gad.expr = SWITCHER
{
    LOOK(plain) VALUE(not4.val)

    BUTTON push SENDS(1) HELP("Click to take the complement of the group")
	VALUE(not4.val.expr) LOOKICON(Empty, bevel) SIZE(0.245, 0.245);
    BUTTON push SENDS(0)
	VALUE(not4.val.expr) LOOKICON(exclamation, bevel) SIZE(0.245, 0.245);
}



grp4.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    FIELD string VALUE(grp4.val) STRETCH(1, 0);
    grp4.menu.expr VALUE(grp4.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}


cnvtype.gad.expr =
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Convert Type") SIZE(1.5, 0)}
    cnvtype.menu.expr VALUE(cnvtype.menuval.expr)
	     LOOKTEXT(select, cnvtype.menuval.expr) STRETCH(1, 0);
}



convertg.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(convertg.val.expr) STRETCH(1,0);
    convertg.menu.expr VALUE(convertg.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}



cnvtname.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Convert Name") SIZE (1.5, 0)}
    FIELD string VALUE(cnvtname.val.expr) STRETCH(1,0);
}


preserve.gad.expr = BUTTON toggle LOOKTEXT(check, "Preserve Original")
		     VALUE(preserve.val.expr) STRETCH(1, 0);



oldname.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(oldname.val.expr) STRETCH(1,0);
    oldname.menu.expr VALUE(oldname.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}



newname.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "New Name") SIZE (1.5, 0)}
    FIELD string VALUE(newname.val.expr) STRETCH(1,0);
}



destroyname.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Group") SIZE (1.5, 0)}
    FIELD string VALUE(destroyname.val.expr) STRETCH(1,0);
    destroyname.menu.expr VALUE(destroyname.menuval.expr)
	    SIZE(0.25, 0.25) LOOK(arrowright);
}



enable.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "Enable") SIZE (1.5, 0)}
    FIELD string VALUE(enable.val.expr) STRETCH(1,0);
}



type.gad.expr = 
{
    LAYOUT(horizontal) STRETCH(1, 0)

    { LOOKTEXT(plain, "group type") SIZE (1.5, 0)}
    FIELD string VALUE(type.val.expr) STRETCH(1,0);
}


switcher3.gad.expr = 
{
    LAYOUT(vertical) STRETCH(1, 0)

    { LOOK(none) SIZE(0, 0.05) }	# Spacer

    {
	LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) SIZE(3.9, 0)

	{ LOOKTEXT(plain, "Convert:") }
	cnvtype.gad.expr;
	convertg.gad.expr;
	cnvtname.gad.expr;
	preserve.gad.expr;
    }

    { LOOK(underline) SIZE(3.9, 0.1) }
    { LOOK(none) SIZE(0, 0.05) }	# Spacer
    {
	LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) SIZE(3.9, 0)

	{ LOOKTEXT(plain, "Rename:") }
	oldname.gad.expr;
	newname.gad.expr;
    }

    { LOOK(underline) SIZE(3.9, 0.1) }
    { LOOK(none) SIZE(0, 0.05) }	# Spacer
    {
	LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) SIZE(3.9, 0)

	{ LOOKTEXT(plain, "Delete:") }
	destroyname.gad.expr;
    }
}

buttons.gad.expr =
{
    LAYOUT(vertical) MARGIN(0.05, 0)
    # WIDTH is 3.9 here, so the widths of the buttons below are
    # 3.9 - (2 * 0.05) - (3 * 0.04) = 3.9 - 0.1 - 0.12 = 3.68

    #switcher controller
    BUTTONSTRIP radio
    {
	LAYOUT(horizontal)  STRETCH(1, 0) MARGIN(0, 0.04) LOOK(plain)
	VALUE(switcher2.gad.expr.val)

	BUTTON push LOOKTEXT(radio, "Number")	SIZE(3.68/4, 0);
	BUTTON push LOOKTEXT(radio, "Bounding")	SIZE(3.68/4, 0);
	BUTTON push LOOKTEXT(radio, "Normal")	SIZE(3.68/4, 0);
	BUTTON push LOOKTEXT(radio, "Edges")	SIZE(3.68/4, 0);
    }

    #page enable buttons
    BUTTONSTRIP bitmap
    {
        LAYOUT(horizontal) STRETCH(1, 0) MARGIN(0, 0.04) LOOK(plain)
	VALUE(enable.val) 

        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
        BUTTON toggle LOOKTEXT(check, "Enable") SIZE(3.68/4, 0);
    }
}

switcher2.gad.expr = 
{
    LAYOUT(vertical) STRETCH(1, 0) MARGIN(0, 0) LOOK(line)
    # WIDTH is 3.9 here

    buttons.gad.expr;

    SWITCHER
    {
	LOOK(line) STRETCH(1, 0) LAYOUT(overlap!) MARGIN(0.05, 0)

	VALUE(switcher2.gad.expr.val)
	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    groupop.gad.expr;
	    pattern.gad.expr;
	    start.gad.expr;
	    inc.gad.expr;
	}

	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    boundtype.gad.expr;
	    t.gad.expr;
	    size.gad.expr;
	}

	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    dir.gad.expr;
	    angle.gad.expr;
	}

	{
	    LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

	    edgeangle.gad.expr;
	    numedge.gad.expr;
	    point.gad.expr;
	}

    }
}

stdswitcher.gad.expr = 
{
    LAYOUT(vertical) STRETCH(1, 0)

    { LOOK(none) SIZE(0, 0.05) }	# Spacer

    BUTTONSTRIP radio
    {
	LAYOUT(horizontal!) MARGIN(0, 0.05) LOOK(whiteunderline) STRETCH(1, 0)
	VALUE(stdswitcher.gad.expr.val)

	BUTTON push LAYOUT(horizontal!) LOOKTEXT(folder, "Create") STRETCH(1, 0);
	BUTTON push LAYOUT(horizontal!) LOOKTEXT(folder, "Combine") STRETCH(1, 0);
	BUTTON push LAYOUT(horizontal!) LOOKTEXT(folder, "Edit") STRETCH(1, 0);
    }
    {
	LAYOUT(vertical) LOOK(tabdialog) STRETCH(1, 0) MARGIN(0.05, 0)

	{ SIZE(0, 0.05) }

	SWITCHER
	{
	    LOOK(plain) MARGIN(0, 0) STRETCH(1, 0) LAYOUT(overlap!)
	    VALUE(stdswitcher.gad.expr.val)
	    {
		LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

		crname.gad.expr;
		grouptype.gad.expr;
		geotype.gad.expr;
		{ SIZE(0, 0.05) }
		switcher2.gad.expr;
	    }

	    {
		LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    grpequal.gad.expr; not1.gad.expr; grp1.gad.expr; }
		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    op1.gad.expr; not2.gad.expr; grp2.gad.expr;}
		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    op2.gad.expr; not3.gad.expr; grp3.gad.expr; }
		{ LAYOUT(horizontal) STRETCH(1,0) MARGIN(0, 0.025)
		    op3.gad.expr; not4.gad.expr; grp4.gad.expr; }
	    }

	    {
		LAYOUT(vertical) MARGIN(0, 0.025) STRETCH(1, 0)

		switcher3.gad.expr;
	    }

	}
    }
}

dialog_expr.gad = 
{
    LAYOUT(vertical!) MARGIN(0, 0.025) STRETCH(0, 0) LOOK(plain)
    { LOOK(underline) SIZE(4, 0.01) STRETCH(0, 0) }

    #group.gad.expr;
    stdswitcher.gad.expr;
    #enable.gad.expr;
    #type.gad.expr;
}


switcher = SWITCHER
{
    VALUE(switcherval) LOOK(plain) LAYOUT(overlap!) STRETCH(0, 0)

    dialog_norm.gad;
    dialog_expr.gad;
}

PSI_KeyLight = SWITCHER
{
    VALUE(PSI_KeyStatus) SIZE(0.18, 0.18)

    BUTTON push HELP("The parameter list has no channels")
		LOOKICON(red_off,	none);
    BUTTON push HELP("All channels are at a keyframe")
		LOOKICON(green_on,	none);
    BUTTON push HELP("Some channels are at a keyframe and some are not")
		LOOKICON(yellow_green,	none);
    BUTTON push HELP("None of the channels are at a keyframe")
		LOOKICON(yellow_on,none);
    BUTTON push HELP("Some channels have been edited off keyframes")
		LOOKICON(red_on,	none);
}

PSI_KeyControls =
{
    LAYOUT(horizontal%) LOOK(line) MARGIN(0.05, 0.05)

    BUTTON push HELP("Previous keyframe") LOOKICON(StepBackward, bevel)
	VALUE(PSI_PrevKey) SIZE(0.18, 0.18);

    PSI_KeyLight;

    BUTTON push HELP("Next keyframe") LOOKICON(StepForeward, bevel)
	VALUE(PSI_NextKey) SIZE(0.18, 0.18);

    BUTTON push HELP("Add keyframes to all channels that have edited off a keyframe") LOOKTEXT(push, "Key") VALUE(PSI_HardenKey) SIZE(0, 0.18) DISABLED;
}

preset.menu = BUTTONSTRIP normal
{
    VALUE(PSI_PRESET) LAYOUT(vertical!) MARGIN(0.01, 0.0) FULLOVERLAY

    BUTTON push LOOKTEXT(pushdown, "Load ...");
    BUTTON push LOOKTEXT(pushdown, "Save as ...");
    { LOOK(line) SIZE(0, 0.02) DISABLED }
    BUTTON push LOOKTEXT(pushdown, "Defaults");
}

dialog = OPENNOTIFIER
{
    LAYOUT(vertical>) MARGIN(0, 0.05) LOOK(plain) VALUE(open.val)
    
    {
	LAYOUT(horizontal%) MARGIN(0, 0.05) STRETCH(1, 0) LOOK(plain)

	BUTTON toggle LOOKTEXT(check, "Expressions") VALUE(switcherval);
	{ LAYOUT(horizontal) STRETCH(1, 0) }
	PSI_KeyControls;
	MENUBUTTON preset.menu LOOKTEXT(popdown, "Presets") VALUE(PSI_PRESET);
	BUTTON push HELP("Undo last change to parameters") LOOKTEXT(push, "Undo") VALUE(PSI_UNDO);
    }

    switcher;
}

SF_SIZES;
