/*
	cumsp_9

*!  VERSION 1.1.2  08aug2006  (deprecated)

*/

VERSION 9.0

INCLUDE graph_header
INCLUDE header
HELP hlp1, view("help cumsp")
RESET res1

DIALOG main, label("cumsp - Cumulative spectral distribution graph")	///
	tabtitle("Main")
BEGIN
  DEFINE _x _xsetbu
  DEFINE _y _top
  INCLUDE _bu_tsset
  TEXT     tx_var        _lft     _top     _cwd2     .,		///
	label("Variable:")
  VARNAME  vn_var        @        _ss      _vnwd     ., allowts	///
	label("Variable")
  CHECKBOX ck_gen        _lft     +35      _cwd1     .,		///
	label("Generate variable holding distribution values:")	///
	onclickon(main.ed_gen.enable)				///
	onclickoff(main.ed_gen.disable)
  EDIT     ed_gen        _indent2 _ss      _vnwd     .,		///
	option(generate) label("Generate variable holding distribution values")
END

INCLUDE ifin
INCLUDE p1_opts
INCLUDE addplot
INCLUDE gr_twoway

SCRIPT PREINIT
BEGIN
	script p1_opts_createAsNoRange
	script p1_opts_setDefaultConnected
END

PROGRAM command
BEGIN
	put "cumsp "
	varlist main.vn_var
	INCLUDE _ifin_pr
	beginoptions
		if main.ck_gen {
			require main.ed_gen
			optionarg main.ed_gen
		}
		put " " /program p1_opts_output
		put " " /program addplot_output
		put " " /program gr_twoway_output
	endoptions
END
