PRO Settings, SAVE = save, RESTORE = restore

;+
; PROGECT:
;       Phoenix 2 solar radio spectrometer
;
; NAME:
;	Settings
;
; PURPOSE:
;	Interface for saving and restoring RagView customized settings
;       
;
; CATEGORY
;       Radio (/ssw/radio)
;
; CALLING SEQUENCE:
;	Settings
;
; KEYWORDS:
;       /SAVE: will save RagView settings in the file ./.ragview
;       /RESTORE: will restore the RagView settings from the file ./.ragview
;       
; COMMON BLOCKS:
;       The user settings are stored in the following common blocks
;       and variables:
;	  COMMON Sizes, size: the size of the window in dev.pix.
;	                pos:  the position of the lower left corner
;	                scale,  width, height: the dimension of the 
;                                              image in the window
;         COMMON Axes, axisOffset:  the nb of pix betw im and axis
;	               imageOffset
;         COMMON PSMisc, encapsulated, landscape, reverse, blFont
;         COMMON BothDisplays, hms, dxBreaks, dyBreaks
;
; SIDE EFFECTS:
;	in Save mode, creates or overwrites the file .ragview
;
; RESTRICTIONS:
;       Currently only tested on Unix systems
;
; MODIFICATION HISTORY:
;	Created: 1991  A.Csillaghy 
;		       Institute for Astronomy, ETH Zurich
;       IDL 5.1 version in October 1998, csillag@ssl.berkeley.edu
;               old ".enrad" replaced by ".ragview"
;-

  COMMON Sizes, size, $ ; the size of the window in dev.pix.
	pos,  $ ; the position of the lower left corner
	scale,  $
	width, height  ; the dimension of the image in the window
  COMMON Axes, axisOffset, $ ; the nb of pix betw im and axis
	imageOffset
  COMMON PSMisc, encapsulated, landscape, reverse, blFont
  COMMON BothDisplays, hms, dxBreaks, dyBreaks
  
  IF Keyword_Set( SAVE ) THEN BEGIN
    Save, FILE = '.ragview', size, pos, scale, width, height, $
	axisOffset, imageOffset, $
	encapsulated, landscape, reverse, blFont, $
	hms, dxBreaks, dyBreaks
  ENDIF ELSE BEGIN
    defaults = FindFile('.ragview')
    IF  defaults(0) EQ '.ragview' THEN Restore, FILE = '.ragview'
  ENDELSE

END

