/*
	graph describe

*!  VERSION 1.1.0  01feb2007

*/

VERSION 10.0

INCLUDE _std_small
DEFINE _dlght 150
INCLUDE header
HELP hlp1, view("help graph_describe")
RESET res1

DIALOG main, label("graph describe - Describe graph")
BEGIN
  RADIO    rb_memgr	_lft	_top	_iwd	.,		///
	first							///
	label("Describe graph in memory")			///
	onclickon(script memorygraph)
  COMBOBOX cb_memgr	+20	_ss	-20	.,		///
	label("Describe graph in memory")			///
	dropdownlist contents(graphs)

  RADIO    rb_diskgr	_lft	_xls	_iwd	.,		///
	last							///
	label("Describe graph on disk")				///
	onclickon(script diskgraph)
  FILE     fi_diskgr	+20	_ss	-20     .,		///
	label("Browse...")					///
	filter("Stata Graphs (*.gph)|*.gph|All Files (*.*)|*.*") ///
	defext(gph)						///
	error("Describe graph on disk")
END

SCRIPT currentgraph
BEGIN
	main.cb_memgr.disable
	main.fi_diskgr.disable
END

SCRIPT memorygraph
BEGIN
	main.cb_memgr.enable
	main.fi_diskgr.disable
END

SCRIPT diskgraph
BEGIN
	main.fi_diskgr.enable
	main.cb_memgr.disable
END

PROGRAM command
BEGIN
	put "graph describe "
	if main.rb_memgr {
		require main.cb_memgr
		put main.cb_memgr
	}
	if main.rb_diskgr {
		require main.fi_diskgr
		put `"""'
		put main.fi_diskgr
		put `"""'
	}
END
