Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: histogramgui - Constructor Up: histogramgui - Tool Previous: Graphical User Interface


Events

The most important event emitted by histogramgui is the change event. It's $value field contains an array (length 2) which contains the new selection choosen by the user. The window may also emit other events, depending on the user. If the user requests the use of standard deviation, mean or median, the histogram will emit a newstats event, the value field of which will contain a string array containing the desired statistics ('stddev', 'mean', 'median'). This indicates that an update is expected via the newstats function. The only other event emitted by the gui is a close event. This lets the controlling GUI know that calculation of the histogram etc is no longer required.



Example
include 'histogramgui.g'   

histwindow := histogramgui(xmin=-5, xmax=5, 
			   array=myHistogramArray, 
			   units='Jy/Beam');
histwindowgui := histwindow.gui();

whenever histwindow->change do {
	# $value now contains an array representing the selection
        # made by the user.
	print 'New selection is: ', $value;
}

whenever somethinglocal->happens do {
	# Something locally changed the selection, so update the
	# histogram window
	histwindow.setselection($value)
}


next up previous contents index
Next: histogramgui - Constructor Up: histogramgui - Tool Previous: Graphical User Interface   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15