/*
	pchi

*!  VERSION 2.0.1  07mar2011

*/

VERSION 12

INCLUDE _std_xlarge  // _std_xlarge is minimum size due to number of tabs (MAC)
DEFINE _dlght 300
INCLUDE header

HELP hlp1, view("help pchi")
RESET res1

DIALOG main, label("pchi - Chi-squared probability plot")	///
	tabtitle("Main")
BEGIN
  TEXT     tx_var	_lft	_top	_iwd	.,		///
	label("Variable:")
  VARNAME  vn_var	@	_ss	_vnwd	.,		///
	label("Variable")

  GROUPBOX gb_opts	@	+35	_iwd	_ht6,		///
	label("Options")

  CHECKBOX ck_grid	_ilft	_ms	_inwd	.,		///
	option(grid)   						///
	label("Show grid at the quartiles")

  SPINNER  sp_df	@	_ls	_spwd	.,		///
	option(df)                                      	///
	label("Degrees of freedom")				///
	min(1) max(10000) default(1)
  TEXT     tx_df	_spsep	@	200	.,		///
	label("Degrees of freedom")
END

SCRIPT POSTINIT
BEGIN
	gr_line_options_optionName.setstring "rlopts"
	gr_line_options.settabtitle "Reference line"
END

INCLUDE ifin

INCLUDE gr_plots
INCLUDE gr_line_options
INCLUDE gr_addplots
INCLUDE gr_yaxis
INCLUDE gr_xaxis
INCLUDE gr_titles
INCLUDE gr_legend
INCLUDE gr_overall

PROGRAM command
BEGIN
	put "pchi "
	varlist main.vn_var
	put " " /program ifin_output
        beginoptions
		option main.ck_grid
		optionarg /hidedefault main.sp_df
		put " " /program gr_plots_output
		put " " /program gr_line_options_output
		put " " /program gr_addplots_output
		put " " /program gr_yaxis_output
		put " " /program gr_xaxis_output
		put " " /program gr_titles_output
		put " " /program gr_legend_output
		put " " /program gr_overall_output
	endoptions
END
