/*
   mi_table_outopts.dlg

*! VERSION 1.0.0  23may2009

*/

VERSION 11.0

INCLUDE _std_msmall
DEFINE _dlght 200
INCLUDE header

RESET res1

DIALOG main, label("Table output options")
BEGIN
  CHECKBOX ck_noheader	_lft	_top	_iwd	.,		///
	option(noheader)					///
	label("Suppress table headers")
  CHECKBOX ck_notable	@	_ms	@	.,		///
	option(notable)						///
	onclickon(program check_notable)			///
	onclickoff(program check_notable)			///
	label("Suppress all table output")
	
  CHECKBOX ck_nocoef	@	_ms	@	.,		///
	option(nocoef)						///
	onclickon(program check_coef) 				///
	onclickoff(program check_coef)				///
	label("Suppress table output related to coefficients")
  CHECKBOX ck_nocmdleg	+20	_ms	_inwd	.,		///
	option(nocmdlegend)					///
	onclickon(program check_coef) 				///
	onclickoff(program check_coef)				///
	label("Suppress command legend")			///
	tooltip("Command legend that appears when only transformed coefficients are displayed")
  CHECKBOX ck_notrcoef	_lft	_ms	_iwd	.,		///
	option(notrcoef)					///
	label("Suppress table output related to transformed coefficients")


  CHECKBOX ck_nolegend	@	_ms	@	.,		///
	option(nolegend)					///
	label("Suppress table legends")

  CHECKBOX ck_nocnsrpt	@	_ms	@	.,		///
	option(nocnsreport)					///
	label("Do not display constraints")	
END

PROGRAM check_notable
BEGIN
	if main.ck_notable {
		call main.ck_nocoef.disable
		call main.ck_nocmdleg.disable
		call main.ck_notrcoef.disable
		call main.ck_nolegend.disable
		call main.ck_nocnsrpt.disable
	}
	else {
		call main.ck_nocoef.enable
		call main.ck_nolegend.enable
		call main.ck_nocnsrpt.enable
		call program check_coef
	}
END

PROGRAM check_coef
BEGIN
	if main.ck_nocoef & main.ck_nocoef.isenabled() {
		call main.ck_notrcoef.disable
		call main.ck_nocnsrpt.disable
		call main.ck_nocmdleg.enable
	}
	else {
		call main.ck_notrcoef.enable
		call main.ck_nocnsrpt.enable
		call main.ck_nocmdleg.disable
	}
END

PROGRAM command
BEGIN
	option main.ck_noheader
	option main.ck_notable
	option main.ck_nocoef
	option main.ck_nocmdleg
	option main.ck_notrcoef
	option main.ck_nolegend
	option main.ck_nocnsrpt
END
