/*
    gr_im_pcarrow_options.dlg
    // special version of arrowhead options for immediate plots
    
*!  VERSION 1.0.0  03jan2007

*/

VERSION 10.0

INCLUDE _std_small
DEFINE _dlght 340
INCLUDE header_gr_child

DEFINE _clwd	15
DEFINE _wd	130
DEFINE _sep	+135
DEFINE _wd2	120
DEFINE _sep2	+125
DEFINE _cbwd	120
DEFINE _cbsep	+125

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

DIALOG main, label("Arrowhead properties") tabtitle("Main")
BEGIN
  GROUPBOX gb_arrow	_lft	_top	_iwd	_ht8,		///
	label("Arrowhead properties")

  TEXT     tx_clr	_ilft	_ss	_wd	.,		///
	label("Color:") right
  COMBOBOX cb_clr	_sep	@	_cbwd	.,		///
	dropdownlist contents(colors) option(mcolor)		///
	onselchangelist(main_cl_clr_sel)
  COLOR    cl_clr	_cbsep	@	_clwd	., option(mcolor)

  TEXT     tx_size	_ilft	_mls	_wd	.,		///
	label("Size:") right
  COMBOBOX cb_size	_sep	@	_cbwd	.,		///
	dropdown option(msize)					///
	contents(symbolsizes)

  TEXT     tx_barbsize	_ilft	_mls	_wd	.,		///
	label("Barb size:") right
  COMBOBOX cb_barbsize	_sep	@	_cbwd	.,		///
	dropdown option(barbsize)				///
	contents(symbolsizes)

  GROUPBOX gb_labels	_lft	+45	_iwd	_ht16h,		///
	label("Label properties")

  TEXT     tx_labclr	_ilft	_ss	_wd	.,		///
	label("Label color:") right
  COMBOBOX cb_labclr	_sep	@	_cbwd	.,		///
	option(mlabcolor)					///
	dropdownlist						///
	contents(colors) onselchangelist(main_cl_labclr_sel)
  COLOR    cl_labclr	_cbsep	@	_clwd	.,		///
	option(mlabcolor)

  TEXT     tx_labsize	_ilft	_mls	_wd	.,		///
	label("Label size:") right
  COMBOBOX cb_labsize	_sep	@	_cbwd	.,		///
	dropdown contents(textsizes) option(mlabsize)

  TEXT     tx_labpos	_ilft	_mls	_wd	.,		///
	label("Label position:") right
  COMBOBOX cb_labpos	_sep	@	_cbwd	.,		///
	option(mlabposition) 					///
	dropdownlist						///
	contents(clockpos)

  TEXT     tx_labangle	_ilft	_mls	_wd	.,		///
	label("Label angle:") right
  COMBOBOX cb_labangle	_sep	@	_cbwd	.,		///
	option(mlabangle) 					///
	dropdown						///
	contents(angles)

  TEXT     tx_labgap	_ilft	_mls	_wd	.,		///
	label("Label gap:") right
  COMBOBOX cb_labgap	_sep	@	_cbwd	.,		///
	option(mlabgap) dropdown contents(textsizes)

  CHECKBOX ck_head	_ilft	_ls	_ibwd	.,		///
	label("Label head of arrow, not tail")			///
	option(headlabel)
END

SCRIPT adv_PREINIT
BEGIN
	adv.gb_style.setlabel "Advanced arrowhead properties"
	adv.gb_style.setposition . . . 140
END

DIALOG adv, tabtitle("Advanced")
BEGIN
  INCLUDE gr_marker_adv

  TEXT     tx_mangle	_ilft 	_mls	_wd	.,		///
	label("Arrowhead angle:") right
  COMBOBOX cb_mangle	_sep	@	_cbwd	.,		///
	option(mangle) dropdown contents(angles)
END

INCLUDE gr_marker_adv_pr

LIST main_cl_clr_sel
BEGIN
	main.cl_clr.hide
	main.cl_clr.show
	main.cl_clr.hide
END

LIST main_cl_labclr_sel
BEGIN
	main.cl_labclr.hide
	main.cl_labclr.show
	main.cl_labclr.hide
END

PROGRAM command
BEGIN
	if main.cl_clr.isvisible() {
		optionarg /quoted main.cl_clr
	}
	if ! main.cl_clr.isvisible() {
		optionarg /hidedefault main.cb_clr
	}
	optionarg /hidedefault main.cb_size
	optionarg /hidedefault main.cb_barbsize
	
	optionarg /hidedefault main.cb_labsize
	if main.cl_labclr.isvisible() {
		optionarg /quoted main.cl_labclr
	}
	if ! main.cl_labclr.isvisible() {
		optionarg /hidedefault main.cb_labclr
	}
	optionarg /hidedefault main.cb_labpos
	optionarg /hidedefault main.cb_labangle
	optionarg /hidedefault main.cb_labgap
	option main.ck_head
	
	put " " /program gr_marker_adv_output
	optionarg adv.cb_mangle
END
