/*
    gr_dot_rect_options.dlg
    
*!  VERSION 1.0.0  18jan2007 

*/

VERSION 10.0

INCLUDE _std_vsmall
DEFINE _dlght 225
INCLUDE header_gr_child

DEFINE _clwd	15
DEFINE _wd	140
DEFINE _sep	+145
DEFINE _cbwd	130
DEFINE _cbsep	+135

HELP hlp1, view("help graph_dot##linelook_options")
RESET res1

DIALOG main, label("Rectangle properties")
BEGIN
  TEXT     tx_rectWidth	_lft	20	_wd	.,		///
	label("Rectangle width:") right
  COMBOBOX cb_rectWidth	_sep	@	_cbwd	.,		///
	dropdown contents(textsizes) option(rwidth)

  TEXT     tx_fclr	_lft	_mls	_wd	.,		///
	label("Fill color:") right
  COMBOBOX cb_fclr	_sep	@	_cbwd	.,		///
	dropdownlist contents(colors) option(fcolor)		///
	onselchangelist(main_cl_fclr_sel)
  COLOR    cl_fclr	_cbsep	@	_clwd	., option(fcolor)
  
  TEXT     tx_intensity	_lft	_mls	_wd	.,		///
	label("Fill intensity:") right
  COMBOBOX cb_intensity	_sep	@	_cbwd	.,		///
	option(fintensity) dropdown contents(intensity)

  TEXT     tx_clr	_lft	_mls	_wd	.,		///
	label("Outline color:") right
  COMBOBOX cb_clr	_sep	@	_cbwd	.,		///
	dropdownlist contents(colors) option(lcolor)		///
	onselchangelist(main_cl_clr_sel)
  COLOR    cl_clr	_cbsep	@	_clwd	., option(lcolor)

  TEXT     tx_width	_lft	 _mls	_wd	.,		///
	label("Outline width:") right
  COMBOBOX cb_width	_sep	@	_cbwd	.,		///
	dropdown option(lwidth)					///
	contents(linewidths)

  TEXT     tx_pattern	_lft	_mls	_wd	.,		///
	label("Outline pattern:") right
  COMBOBOX cb_pattern	_sep	@	_cbwd	.,		///
	dropdownlist option(lpattern)				///
	contents(linepatterns) 
END

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

LIST main_cl_fclr_sel
BEGIN
	main.cl_fclr.hide
	main.cl_fclr.show
	main.cl_fclr.hide
END

PROGRAM main_output
BEGIN
	if main.cl_fclr.isvisible() {
		optionarg /quoted main.cl_fclr
	}
	if ! main.cl_fclr.isvisible() {
		optionarg /hidedefault main.cb_fclr
	}
	optionarg main.cb_intensity

	if main.cl_clr.isvisible() {
		optionarg /quoted main.cl_clr
	}
	if ! main.cl_clr.isvisible() {
		optionarg /hidedefault main.cb_clr
	}	
	optionarg /hidedefault main.cb_width
	optionarg /hidedefault main.cb_pattern
END

PROGRAM command
BEGIN
	optionarg /hidedefault main.cb_rectWidth
	if (	main.cl_fclr.isvisible() 			///
		| (! main.cl_fclr.isvisible() & main.cb_fclr)	///
		| main.cb_intensity				///
		| main.cl_clr.isvisible()			///
		| (! main.cl_clr.isvisible() & main.cb_clr)	///
		| main.cb_width					///
		| main.cb_pattern				///
	) {
		   put " rectangle("
		   put /program main_output
		   put ") "
	}
END
