/*
    gr_axis_scale_options.dlg
    
*!  VERSION 1.0.0  27dec2006

*/

VERSION 10.0

INCLUDE _std_vsmall
DEFINE _dlght 160
INCLUDE header_gr_child

DEFINE _clwd 15

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

DIALOG main, label("Axis scale options") tabtitle("Main")
BEGIN	
  CHECKBOX ck_log	_lft	_top	_iwd	.,		///
	label("Use logarithmic scale")				///
	option(log)
  CHECKBOX ck_reverse	@	_ms	@	.,		///
	label("Reverse scale to run from maximum to minimum")	///
	option(reverse)

  CHECKBOX ck_range	_lft	_ls	_iwd	_ht4h,		///
	groupbox						///
	label("Extend range of axis scale")			///
	onclickon(script range_on)				///
	onclickoff(script range_off)
  TEXT	   tx_lower	_ilft	_ss	100	.,		///
	label("Lower limit:") right
  EDIT	   ed_lower	+105 	@	50	.,		///
	numonly label("Lower limit")

  TEXT	   tx_upper	_ilft	_ms	100	.,		///
	label("Upper limit:") right
  EDIT	   ed_upper	+105 	@	50	.,		///
	numonly label("Upper limit")
END

SCRIPT range_on
BEGIN
	main.ed_lower.enable
	main.tx_lower.enable
	main.ed_upper.enable
	main.tx_upper.enable
END

SCRIPT range_off
BEGIN
	main.ed_lower.disable
	main.tx_lower.disable
	main.ed_upper.disable
	main.tx_upper.disable
END

PROGRAM command
BEGIN
	option main.ck_log
	option main.ck_reverse
	
	if main.ck_range {
		require main.ed_lower
		require main.ed_upper
		put " range("
		put main.ed_lower " "
		put main.ed_upper
		put ") "
	}
END
