/* $Id: Axis.h,v 1.1 91/05/20 15:11:40 gnb Exp $ */
/* $Source: /export/sources/x/At/Plotter/tmp/RCS/Axis.h,v $ */

/*

Copyright 1990,1991 by the Massachusetts Institute of Technology

All rights reserved.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of the Massachusetts
Institute of Technology (M.I.T.) not be used in advertising or publicity
pertaining to distribution of the software without specific, written
prior permission.

M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.

*/

/*
 * $Log:	Axis.h,v $
 * Revision 1.1  91/05/20  15:11:40  gnb
 * Initial revision
 * 
 * 
 */

#ifndef _AtAxis_h
#define _AtAxis_h

#ifdef _AtDevelopment_
#include "Scale.h"
#else
#include <At/Scale.h>
#endif

#include <stdio.h>
    
#define XtNlabel "label"
#define XtNlabelFontFamily "labelFontFamily"
#define XtNnumberFontFamily "numberFontFamily"
#define XtNlabelSize "labelSize"
#define XtNnumberSize "numberSize"
#define XtNnumberStyle "numberStyle"
#define XtNaxisColor "axisColor"
#define XtNnumberColor "numberColor"
#define XtNlabelColor "labelColor"
#define XtNmin "min"
#define XtNmax "max"
#define XtNroundEndpoints "roundEndpoints"
#define XtNtransform "transform"
#define XtNvertical "vertical"
#define XtNmirror "mirror"
#define XtNdrawNumbers "drawNumbers"    
#define XtNdrawGrid "drawGrid"
#define XtNnumbersOutside "numbersOutside"
#define XtNautoNumber "autoNumber"
#define XtNticInterval "ticInterval"
#define XtNsubtics "subtics"    
#define XtNticDensity "ticDensity"
#define XtNsubticDensity "subticDensity"
#define XtNticMultiplier "ticMultiplier"
#define XtNticFormat "ticFormat"
#define XtNticsOutside "ticsOutside"
#define XtNticsInside "ticsInside"
#define XtNticLength "ticLength"
#define XtNsubticLength "subticLength"   
#define XtNaxisNeedsRedraw "axisNeedsRedraw"    
#define XtNticLabels "ticLabels"
#define XtNerrorCallback "errorCallback"
    
#define XtCLabel "Label"
#define XtCMin "Min"
#define XtCMax "Max"
#define XtCRoundEndpoints "RoundEndpoints"
#define XtCTransform "Transform"
#define XtCVertical "Vertical"
#define XtCMirror "Mirror"
#define XtCDrawNumbers "DrawNumbers"    
#define XtCDrawGrid "DrawGrid"
#define XtCTicsOutside "TicsOutside"
#define XtCNumbersOutside "NumbersOutside"
#define XtCAutoNumber "AutoNumber"
#define XtCTicInterval "TicInterval"
#define XtCSubtics "Subtics"    
#define XtCTicDensity "TicDensity"
#define XtCSubticDensity "SubticDensity"
#define XtCTicMultiplier "TicMultiplier"
#define XtCTicFormat "TicFormat"
#define XtCTicsOutside "TicsOutside"
#define XtCTicsInside "TicsInside"    
#define XtCTicLength "TicLength"
#define XtCaxisNeedsRedraw "AxisNeedsRedraw"    
#define XtCTicLabels "TicLabels"
#define XtCErrorCallback "ErrorCallback"

/* Class record constants */

extern WidgetClass atAxisObjectClass;

typedef struct _AtAxisClassRec * AtAxisObjectClass;
typedef struct _AtAxisRec      * AtAxisObject;

#ifndef P
# ifdef __STDC__
#  define P(args) args
# else
#  define P(args) ()
# endif 
#endif 

extern int AtAxisWidth P((AtAxisObject));
extern void AtAxisDraw P((Display *, Window, AtAxisObject, Pixel, Region));

extern AtScale *AtAxisGetScale P((AtAxisObject));
extern AtTransform AtAxisGetTransform P((AtAxisObject)); 
extern void AtAxisGetBounds P((AtAxisObject, double *minp, double *maxp));
extern void AtAxisSetBounds P((AtAxisObject,double min, double max));
extern void AtAxisCopyBounds P((AtAxisObject from, AtAxisObject to));
extern void AtAxisCopyTics P((AtAxisObject from, AtAxisObject to));
extern void AtAxisSetLocation P((AtAxisObject, int x1, int y1, int x2,
			      int y2, int grid_length)); 

extern int AtAxisWidthPS P((AtAxisObject));
extern void AtAxisDrawPS P((FILE *,AtAxisObject, int, int, int, int,
			    int, int));

/*
 * An alternative for numbering axes and choosing tic marks,
 * especially useful for date axes.  Requires integer axis bounds and
 * no roundEndpoints.  Will over-ride autoNumber, ticInterval,
 * tics, subtics etc.  Will set tics and subtics.
 */ 
extern void AtAxisDateLabels P((AtAxisObject, String *, int stride,
				int start, int num));
#endif /* _AtAxis_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */

