/*
    gr_function_options.dlg
    
*!  VERSION 1.0.0  04aug2006 

*/

VERSION 10

INCLUDE _std_vsmall
DEFINE _dlght 190
INCLUDE header_gr_child

DEFINE _clwd 15

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

DIALOG main, title("Function options")
BEGIN
  SPINNER  sp_points	_lft	_top	_spwd	.,	///
	min(1) default(300) max(10000000) option(n)
  TEXT     tx_points	_spsep	@	150	.,	///
	label("Evaluation points")

  CHECKBOX ck_droplines	_lft	+35	_iwd	_ht6,	///
	groupbox					///
	onclickon(script droplines_on)			///
	onclickoff(script droplines_off)		///
	label("Draw lines to axis at specified values")
  EDIT     ed_droplines	_ilft	_ms	_vnwd	.,	///
	label("Values") option(dropline)
  TEXT     tx_droplines	_vnsep	@	100	.,	///
	label("Values")

  EDIT     ed_baseline	_ilft	_ls	_en7wd	.,	///
	numonly label("Values") default(0) option(base)
  TEXT     tx_baseline	_en7sep	@	100	.,	///
	label("Baseline")

  CHECKBOX ck_horizontal _lft	+50	_iwd	.,	///
	label("Plot graph horizontally") option(horizontal)
END

SCRIPT droplines_on
BEGIN
	main.ed_droplines.enable
	main.tx_droplines.enable
	main.ed_baseline.enable
	main.tx_baseline.enable
END

SCRIPT droplines_off
BEGIN
	main.ed_droplines.disable
	main.tx_droplines.disable
	main.ed_baseline.disable
	main.tx_baseline.disable
END

PROGRAM command
BEGIN
	optionarg /hidedefault main.sp_points
	if main.ck_droplines {
		require main.ed_droplines
		optionarg main.ed_droplines
		optionarg /hidedefault main.ed_baseline
	}
	option main.ck_horizontal
END
