/*
  gpieslices.idlg -- include file for styles of pie slices

*!  VERSION 1.1.1  31mar2005

*/

DIALOG ps, tabtitle("Slices")
BEGIN
  RADIO    rb_all          _lft      _top      _cwd1      .,		///
	label("Customize all pie slices") first				///
	onclickon(script ps_hidestuff)
  RADIO    rb_some         @         _ss       _cwd1      .,		///
	label("Customize individual and groups of slices") 		///
	onclickon(script ps_showstuff) last

  GROUPBOX gb_slice1       @         _ls       _gwd4_1    _ht7h,	///
	label("One")
  DEFINE holdy @y
  TEXT     tx_slice1       _ilft     _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice1       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice1       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode1     _ilft     _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode1.enable)				///
	onclickoff(ps.ed_explode1.disable)
  EDIT     ed_explode1     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode1     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color1       _ilft     _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color1       _txsep    @         _tcr4gi    .,		///
	contents(colors) dropdownlist option(color)			///
	onselchangelist(ps_color1_change)
  COLOR    cl_color1       _tcr4gisep @        _colorwd   .,		///
	option(color)

  GROUPBOX gb_slice2       _lft      _xxls     _gwd4_1    _ht7h,	///
	label("Five")
  TEXT     tx_slice2       _ilft     _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice2       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice2       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode2     _ilft     _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode2.enable)				///
	onclickoff(ps.ed_explode2.disable)
  EDIT     ed_explode2     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode2     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color2       _ilft     _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color2       _txsep    @         _tcr4gi    .,		///
	contents(colors) dropdownlist option(color) 			///
 	onselchangelist(ps_color2_change)
  COLOR    cl_color2       _tcr4gisep @        _colorwd   .,		///
	option(color)

  GROUPBOX gb_slice3       _gft4_2   holdy     _gwd4_1    _ht7h,	///
	label("Two")
  TEXT     tx_slice3       _lft4_2gi _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice3       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice3       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode3     _lft4_2gi    _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode3.enable)				///
	onclickoff(ps.ed_explode3.disable)
  EDIT     ed_explode3     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode3     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color3       _lft4_2gi _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color3       _txsep    @         _tcr4gi    .,		///
	contents(colors) dropdownlist option(color)			///
	onselchangelist(ps_color3_change)
  COLOR    cl_color3       _tcr4gisep @        _colorwd   .,		///
	option(color)

  GROUPBOX gb_slice4       _gft4_2   _xxls      _gwd4_1    _ht7h,	///
	label("Six")
  TEXT     tx_slice4       _lft4_2gi _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice4       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice4       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode4     _lft4_2gi _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode4.enable)				///
	onclickoff(ps.ed_explode4.disable)
  EDIT     ed_explode4     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode4     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color4       _lft4_2gi _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color4       _txsep    @         _tcr4gi    .,		///
	contents(colors) dropdownlist option(color)			///
	onselchangelist(ps_color4_change)
  COLOR    cl_color4       _tcr4gisep @        _colorwd   .,		///
	option(color)


  GROUPBOX gb_slice5       _gft4_3   holdy     _gwd4_1    _ht7h,	///
	label("Three")
  TEXT     tx_slice5       _igft4_3  _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice5       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice5       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode5     _igft4_3  _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode5.enable)				///
	onclickoff(ps.ed_explode5.disable)
  EDIT     ed_explode5     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode5     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color5       _igft4_3  _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color5       _txsep    @         _tcr4gi    .,		///
	contents(colors) dropdownlist option(color)			///
	onselchangelist(ps_color5_change)
  COLOR    cl_color5       _tcr4gisep @        _colorwd   .,		///
	option(color)

  GROUPBOX gb_slice6       _gft4_3   _xxls     _gwd4_1    _ht7h,	///
	label("Seven")
  TEXT     tx_slice6       _igft4_3  _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice6       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice6       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode6     _igft4_3  _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode6.enable)				///
	onclickoff(ps.ed_explode6.disable)
  EDIT     ed_explode6     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode6     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color6       _igft4_3  _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color6       _txsep    @         _tcr4gi    .,		///
	contents(colors)  dropdownlist option(color)			///
	onselchangelist(ps_color6_change)
  COLOR    cl_color6       _tcr4gisep @        _colorwd   .,		///
	option(color)

  GROUPBOX gb_slice7       _gft4_4   holdy     _gwd4_1    _ht7h,	///
	label("Four")
  TEXT     tx_slice7       _lft4_4gi _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice7       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice7       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode7     _lft4_4gi _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode7.enable)				///
	onclickoff(ps.ed_explode7.disable)
  EDIT     ed_explode7     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode7     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color7       _lft4_4gi _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color7       _txsep    @         _tcr4gi    .,		///
	contents(colors) dropdownlist option(color)			///
	onselchangelist(ps_color7_change)
  COLOR    cl_color7       _tcr4gisep @        _colorwd   .,		///
	option(color)

  GROUPBOX gb_slice8       _gft4_4   _xxls      _gwd4_1    _ht7h,	///
	label("Eight")
  TEXT     tx_slice8       _lft4_4gi _ss       _txwd      .,		///
	label("Slice(s):") right
  EDIT     ed_slice8       _txsep    @         _en7wd     .,		///
	label("Slice(s)")
  BUTTON   bu_slice8       _en7sep   @         _btwd      .,		///
	label("?") onpush(view help numlist##|_new)
  CHECKBOX ck_explode8     _lft4_4gi _ms       _txwd      .,		///
	label("Explode") option(explode)				///
	onclickon(ps.ed_explode8.enable)				///
	onclickoff(ps.ed_explode8.disable)
  EDIT     ed_explode8     _txsep    @         _en7wd     .,		///
	label("Explode") default(3.8) option(explode)
  BUTTON   bu_explode8     _en7sep   @         _btwd      .,		///
	label("?") onpush(view help relativesize##|_new)
  TEXT     tx_color8       _lft4_4gi _ms       _txwd      .,		///
	label("Color:") right
  COMBOBOX cb_color8       _txsep    @         _tcr4gi    .,		///
	contents(colors) dropdownlist option(color)			///
	onselchangelist(ps_color8_change)
  COLOR    cl_color8       _tcr4gisep @        _colorwd   .,		///
 	option(color)
END

LIST ps_color1_change
BEGIN
	ps.cl_color1.hide
	ps.cl_color1.show
	ps.cl_color1.hide
END

LIST ps_color2_change
BEGIN
	ps.cl_color2.hide
	ps.cl_color2.show
	ps.cl_color2.hide
END

LIST ps_color3_change
BEGIN
	ps.cl_color3.hide
	ps.cl_color3.show
	ps.cl_color3.hide
END

LIST ps_color4_change
BEGIN
	ps.cl_color4.hide
	ps.cl_color4.show
	ps.cl_color4.hide
END

LIST ps_color5_change
BEGIN
	ps.cl_color5.hide
	ps.cl_color5.show
	ps.cl_color5.hide
END

LIST ps_color6_change
BEGIN
	ps.cl_color6.hide
	ps.cl_color6.show
	ps.cl_color6.hide
END

LIST ps_color7_change
BEGIN
	ps.cl_color7.hide
	ps.cl_color7.show
	ps.cl_color7.hide
END

LIST ps_color8_change
BEGIN
	ps.cl_color8.hide
	ps.cl_color8.show
	ps.cl_color8.hide
END

SCRIPT ps_hidestuff
BEGIN
	ps.gb_slice1.setlabel "All"
	ps.gb_slice1.setposition . . . 75
	ps.gb_slice1.setposition . . . 80
	ps.ck_explode1.setposition . 80
	ps.ed_explode1.setposition . 80
	ps.bu_explode1.setposition . 80
	ps.tx_color1.setposition . 105
	ps.cb_color1.setposition . 105
	ps.cl_color1.setposition . 105

	ps.tx_slice1.hide
	ps.ed_slice1.hide
	ps.bu_slice1.hide

	ps.gb_slice2.hide
	ps.tx_slice2.hide
	ps.ed_slice2.hide
	ps.bu_slice2.hide
	ps.ck_explode2.hide
	ps.ed_explode2.hide
	ps.bu_explode2.hide
	ps.tx_color2.hide
	ps.cb_color2.hide
	ps.cl_color2.hide

	ps.gb_slice3.hide
	ps.tx_slice3.hide
	ps.ed_slice3.hide
	ps.bu_slice3.hide
	ps.ck_explode3.hide
	ps.ed_explode3.hide
	ps.bu_explode3.hide
	ps.tx_color3.hide
	ps.cb_color3.hide
	ps.cl_color3.hide

	ps.gb_slice4.hide
	ps.tx_slice4.hide
	ps.ed_slice4.hide
	ps.bu_slice4.hide
	ps.ck_explode4.hide
	ps.ed_explode4.hide
	ps.bu_explode4.hide
	ps.tx_color4.hide
	ps.cb_color4.hide
	ps.cl_color4.hide

	ps.gb_slice5.hide
	ps.tx_slice5.hide
	ps.ed_slice5.hide
	ps.bu_slice5.hide
	ps.ck_explode5.hide
	ps.ed_explode5.hide
	ps.bu_explode5.hide
	ps.tx_color5.hide
	ps.cb_color5.hide
	ps.cl_color5.hide

	ps.gb_slice6.hide
	ps.tx_slice6.hide
	ps.ed_slice6.hide
	ps.bu_slice6.hide
	ps.ck_explode6.hide
	ps.ed_explode6.hide
	ps.bu_explode6.hide
	ps.tx_color6.hide
	ps.cb_color6.hide
	ps.cl_color6.hide

	ps.gb_slice7.hide
	ps.tx_slice7.hide
	ps.ed_slice7.hide
	ps.bu_slice7.hide
	ps.ck_explode7.hide
	ps.ed_explode7.hide
	ps.bu_explode7.hide
	ps.tx_color7.hide
	ps.cb_color7.hide
	ps.cl_color7.hide

	ps.gb_slice8.hide
	ps.tx_slice8.hide
	ps.ed_slice8.hide
	ps.bu_slice8.hide
	ps.ck_explode8.hide
	ps.ed_explode8.hide
	ps.bu_explode8.hide
	ps.tx_color8.hide
	ps.cb_color8.hide
	ps.cl_color8.hide
END

SCRIPT ps_showstuff
BEGIN
	ps.gb_slice1.setlabel "One"
	ps.gb_slice1.setposition . . . 105
	ps.ck_explode1.setposition . 105
	ps.ed_explode1.setposition . 105
	ps.bu_explode1.setposition . 105
	ps.tx_color1.setposition . 130
	ps.cb_color1.setposition . 130
	ps.cl_color1.setposition . 130

	ps.tx_slice1.show
	ps.ed_slice1.show
	ps.bu_slice1.show

	ps.gb_slice2.show
	ps.tx_slice2.show
	ps.ed_slice2.show
	ps.bu_slice2.show
	ps.ck_explode2.show
	ps.ed_explode2.show
	ps.bu_explode2.show
	ps.tx_color2.show
	ps.cb_color2.show
	ps.cb_color2.withvalue ps.cb_color2.setvalue "@"

	ps.gb_slice3.show
	ps.tx_slice3.show
	ps.ed_slice3.show
	ps.bu_slice3.show
	ps.ck_explode3.show
	ps.ed_explode3.show
	ps.bu_explode3.show
	ps.tx_color3.show
	ps.cb_color3.show
	ps.cb_color3.withvalue ps.cb_color3.setvalue "@"

	ps.gb_slice4.show
	ps.tx_slice4.show
	ps.ed_slice4.show
	ps.bu_slice4.show
	ps.ck_explode4.show
	ps.ed_explode4.show
	ps.bu_explode4.show
	ps.tx_color4.show
	ps.cb_color4.show
	ps.cb_color4.withvalue ps.cb_color4.setvalue "@"

	ps.gb_slice5.show
	ps.tx_slice5.show
	ps.ed_slice5.show
	ps.bu_slice5.show
	ps.ck_explode5.show
	ps.ed_explode5.show
	ps.bu_explode5.show
	ps.tx_color5.show
	ps.cb_color5.show
	ps.cb_color5.withvalue ps.cb_color5.setvalue "@"

	ps.gb_slice6.show
	ps.tx_slice6.show
	ps.ed_slice6.show
	ps.bu_slice6.show
	ps.ck_explode6.show
	ps.ed_explode6.show
	ps.bu_explode6.show
	ps.tx_color6.show
	ps.cb_color6.show
	ps.cb_color6.withvalue ps.cb_color6.setvalue "@"

	ps.gb_slice7.show
	ps.tx_slice7.show
	ps.ed_slice7.show
	ps.bu_slice7.show
	ps.ck_explode7.show
	ps.ed_explode7.show
	ps.bu_explode7.show
	ps.tx_color7.show
	ps.cb_color7.show
	ps.cb_color7.withvalue ps.cb_color7.setvalue "@"

	ps.gb_slice8.show
	ps.tx_slice8.show
	ps.ed_slice8.show
	ps.bu_slice8.show
	ps.ck_explode8.show
	ps.ed_explode8.show
	ps.bu_explode8.show
	ps.tx_color8.show
	ps.cb_color8.show
	ps.cb_color8.withvalue ps.cb_color8.setvalue "@"
END

PROGRAM ps_slice1_output
BEGIN
	if ps.ck_explode1 & !default(ps.ed_explode1) 	/*
	*/ & ps.ed_explode1 {
		optionarg ps.ed_explode1
	}
	if ps.ck_explode1 & (default(ps.ed_explode1) | 	/*
	*/ !ps.ed_explode1) {
		option ps.ck_explode1
	}
	if Hcc(ps.cb_color1) {
		optionarg /quoted ps.cl_color1
	}
	if !Hcc(ps.cb_color1) {
		optionarg ps.cb_color1
	}
END

PROGRAM ps_slice2_output
BEGIN
	if ps.ck_explode2 & !default(ps.ed_explode2) 	/*
	*/ & ps.ed_explode2 {
		optionarg ps.ed_explode2
	}
	if ps.ck_explode2 & (default(ps.ed_explode2) | 	/*
	*/ !ps.ed_explode2) {
		option ps.ck_explode2
	}
	if Hcc(ps.cb_color2) {
		optionarg /quoted ps.cl_color2
	}
	if !Hcc(ps.cb_color2) {
		optionarg ps.cb_color2
	}
END

PROGRAM ps_slice3_output
BEGIN
	if ps.ck_explode3 & !default(ps.ed_explode3) 	/*
	*/ & ps.ed_explode3 {
		optionarg ps.ed_explode3
	}
	if ps.ck_explode3 & (default(ps.ed_explode3) | 	/*
	*/ !ps.ed_explode3) {
		option ps.ck_explode3
	}
	if Hcc(ps.cb_color3) {
		optionarg /quoted ps.cl_color3
	}
	if !Hcc(ps.cb_color3) {
		optionarg ps.cb_color3
	}
END

PROGRAM ps_slice4_output
BEGIN
	if ps.ck_explode4 & !default(ps.ed_explode4) 	/*
	*/ & ps.ed_explode4 {
		optionarg ps.ed_explode4
	}
	if ps.ck_explode4 & (default(ps.ed_explode4) | 	/*
	*/ !ps.ed_explode4) {
		option ps.ck_explode4
	}
	if Hcc(ps.cb_color4) {
		optionarg /quoted ps.cl_color4
	}
	if !Hcc(ps.cb_color4) {
		optionarg ps.cb_color4
	}
END

PROGRAM ps_slice5_output
BEGIN
	if ps.ck_explode5 & !default(ps.ed_explode5) 	/*
	*/ & ps.ed_explode5 {
		optionarg ps.ed_explode5
	}
	if ps.ck_explode5 & (default(ps.ed_explode5) | 	/*
	*/ !ps.ed_explode5) {
		option ps.ck_explode5
	}
	if Hcc(ps.cb_color5) {
		optionarg /quoted ps.cl_color5
	}
	if !Hcc(ps.cb_color5) {
		optionarg ps.cb_color5
	}
END

PROGRAM ps_slice6_output
BEGIN
	if ps.ck_explode6 & !default(ps.ed_explode6) 	/*
	*/ & ps.ed_explode6 {
		optionarg ps.ed_explode6
	}
	if ps.ck_explode6 & (default(ps.ed_explode6) | 	/*
	*/ !ps.ed_explode6) {
		option ps.ck_explode6
	}
	if Hcc(ps.cb_color6) {
		optionarg /quoted ps.cl_color6
	}
	if !Hcc(ps.cb_color6) {
		optionarg ps.cb_color6
	}
END

PROGRAM ps_slice7_output
BEGIN
	if ps.ck_explode7 & !default(ps.ed_explode7) 	/*
	*/ & ps.ed_explode7 {
		optionarg ps.ed_explode7
	}
	if ps.ck_explode7 & (default(ps.ed_explode7) | 	/*
	*/ !ps.ed_explode7) {
		option ps.ck_explode7
	}
	if Hcc(ps.cb_color7) {
		optionarg /quoted ps.cl_color7
	}
	if !Hcc(ps.cb_color7) {
		optionarg ps.cb_color7
	}
END

PROGRAM ps_slice8_output
BEGIN
	if ps.ck_explode8 & !default(ps.ed_explode8) 	/*
	*/ & ps.ed_explode8 {
		optionarg ps.ed_explode8
	}
	if ps.ck_explode8 & (default(ps.ed_explode8) | 	/*
	*/ !ps.ed_explode8) {
		option ps.ck_explode8
	}
	if Hcc(ps.cb_color8) {
		optionarg /quoted ps.cl_color8
	}
	if !Hcc(ps.cb_color8) {
		optionarg ps.cb_color8
	}
END

PROGRAM gpieslices_output
BEGIN
	if ps.rb_all {
		if ps.ck_explode1 | ps.cb_color1  {
			put " pie(_all, "
			put " "/program ps_slice1_output
			put ")"
		}
	}
	if ps.rb_some {
		if ps.ed_slice1 & (ps.ck_explode1 | ps.cb_color1) {
			put " pie("
			put ps.ed_slice1 ", "
			put " "/program ps_slice1_output
			put ")"
		}
		if ps.ed_slice2 & (ps.ck_explode2 | ps.cb_color2) {
			put " pie("
			put ps.ed_slice2 ", "
			put " "/program ps_slice2_output
			put ")"
		}
		if ps.ed_slice3 & (ps.ck_explode3 | ps.cb_color3) {
			put " pie("
			put ps.ed_slice3 ", "
			put " "/program ps_slice3_output
			put ")"
		}
		if ps.ed_slice4 & (ps.ck_explode4 | ps.cb_color4) {
			put " pie("
			put ps.ed_slice4 ", "
			put " "/program ps_slice4_output
			put ")"
		}
		if ps.ed_slice5 & (ps.ck_explode5 | ps.cb_color5) {
			put " pie("
			put ps.ed_slice5 ", "
			put " "/program ps_slice5_output
			put ")"
		}
		if ps.ed_slice6 & (ps.ck_explode6 | ps.cb_color6) {
			put " pie("
			put ps.ed_slice6 ", "
			put " "/program ps_slice6_output
			put ")"
		}
		if ps.ed_slice7 & (ps.ck_explode7 | ps.cb_color7) {
			put " pie("
			put ps.ed_slice7 ", "
			put " "/program ps_slice7_output
			put ")"
		}
		if ps.ed_slice8 & (ps.ck_explode8 | ps.cb_color8) {
			put " pie("
			put ps.ed_slice8 ", "
			put " "/program ps_slice8_output
			put ")"
		}
	}
END
