home *** CD-ROM | disk | FTP | other *** search
-
- /* $Id: Status.h,v 1.1.1.1 1993/03/18 03:35:25 davis Exp $ */
-
- #import <objc/List.h>
- #import <objc/Object.h>
-
- #import <streams/streams.h>
-
- #import "DoubleValueSortedList.h"
-
- #define X_TAG 0
- #define Y_TAG 1
- #define Z_TAG 2
- #define R_TAG 3
- #define ANGLES_RADIANS 0
- #define ANGLES_DEGREES 1
- #define TIC_COMPUTED 1 /* default; gnuplot calcs them */
- #define TIC_SERIES 2 /* user-defined series */
- #define TIC_USER 3 /* user-defined points */
- #define CONTOUR_KIND_LINEAR 0
- #define CONTOUR_KIND_CUBIC_SPL 1
- #define CONTOUR_KIND_BSPLINE 2
-
-
- @interface Status:Object
- {
- NXZone *zone; /* Our zone */
- id delegate; /* Whom to inform if settings change */
-
- BOOL report; /* Report setting changes to delegate? */
-
- char *text; /* Command text that we pass to gnuplot */
- NXStream *s_epsStream; /* Term writes EPS to this stream */
-
- /*** Settings ***/
-
- BOOL isThreeD; /* Is this a 3D plot (or just 2D)? */
- BOOL s_parametric; /* Is this a parametric plot? */
- BOOL s_polar; /* Is this a polar plot? */
- BOOL s_border; /* Does it have a border? */
- BOOL s_draw_surface; /* Should we show the surface? */
- BOOL contourBase; /* Should a contour appear on the base? */
- BOOL contourSurface; /* Should a contour appear on the surf? */
- int s_contour_kind; /* Type of contour */
- int s_contour_pts; /* Contour points */
- int s_contour_order;
- BOOL s_label_contours;
-
- BOOL s_grid; /* Does it have a grid? */
- BOOL s_xzeroaxis; /* Should we show the x-zeroaxis? */
- BOOL s_yzeroaxis; /* Should we show the y-zeroaxis? */
-
- BOOL s_tics_in; /* Should the tics be in (or out)? */
- BOOL s_ticsCoord[3]; /* Should the axis have tics at all? */
- int s_ticTypeCoord[3]; /* What type tics does the coord use? */
- struct _ticSeries {
- double start, incr, end;
- } s_ticSeriesCoord[3]; /* Tics Series parameters */
- DoubleValueSortedList *ticDefs[3]; /* Custom, user-defined tics */
-
- BOOL s_isLogCoord[3]; /* Is this axis a log scale? */
-
- char *s_title; /* Plot title */
- char *s_labelCoord[3]; /* Labels for the axes */
-
- int s_fontsize; /* Font size in points */
- char *s_font; /* Font string. Example: "Times-Roman" */
-
- BOOL s_key; /* Is there a key? */
- BOOL s_key_default; /* Would a key be in the default loc.? */
- double s_keyCoord[3]; /* Location of the key if not default */
-
- BOOL s_time; /* Should we show the time/date? */
- BOOL s_time_default; /* Should time/date be in default loc.? */
- int s_timeCoord[3]; /* Location of time/date if not default */
-
- BOOL sizeProp; /* Should we keep x & y proportional? */
- float s_xsize, s_ysize; /* Size of the plot */
- int s_samples; /* Number of samples per function plot */
- int s_samplesCoord[2];
- int s_iso_samplesCoord[2];
-
- BOOL s_hidden3d; /* Are the hidden lines removed? */
-
- float s_rotCoord[3]; /* How the 3D view is rotated */
-
- BOOL s_autoscaleCoord[4]; /* Are we autoscaling? */
-
- double s_minCoord[4]; /* Axis Ranges */
- double s_maxCoord[4];
-
- char *s_dummy_var[2]; /* Dummy vars for functions */
-
- BOOL degrees; /* Are ranges in degrees? (Or radians?) */
-
- char *s_plotargs; /* Arguments for a plot command */
- List *functions; /* List of FunctionObjects, which store */
- /* info about functions (titles, style) */
-
- char *appendix; /*
- * Appendix is a postamble where we
- * can put newline-separated Gnuplot
- * commands that will override any of
- * the settings. We use it to
- * process the text read from a file,
- * before we've had a chance to set
- * the instance variables.
- */
-
- BOOL areSettingsEdited; /* Do the plotargs and text need to be */
- /* rebuilt? */
- }
-
- + lastplot;
- + setHalvePlot:(BOOL)condition;
-
- - init;
- - free;
-
- - setReport:(BOOL)cond;
- - (BOOL)report;
-
- - setDelegate: anObject;
- - delegate;
-
- - (NXStream *)stream;
-
- - plot; /* Plot current settings */
- - (BOOL)canPlot; /* Can we plot current settings */
-
- - saveToFile:(const char *)filename; /* Save current settings */
- - reportSettingsChange:sender; /* Inform delegate of change */
- - resetCurrent; /* Reset settings to defaults */
- - applyCurrent; /* Set gnuplot vars from ours */
- - applyCurrentTicDefs; /* Set gnuplot ticdefs from ours*/
- - grabCurrent; /* Set our vars from gnuplot's */
- - grabCurrentTicDefs; /* Set our ticdefs */
- - grabFunctionsFrom: (char *) aString; /* aString is the plot command */
-
- - setThreeD:(BOOL) aCondition; /* Setting instance variables */
- - (BOOL) isThreeD;
- - setParametric:(BOOL) cond;
- - (BOOL) parametric;
- - setPolar:(BOOL) cond;
- - (BOOL) isPolar;
- - setBorder:(BOOL) cond;
- - (BOOL) border;
- - setSurface:(BOOL) cond;
- - (BOOL) surface;
-
- - setHiddenThreeD:(BOOL) cond;
- - (BOOL) hiddenThreeD;
- - setGrid:(BOOL) cond;
- - (BOOL) grid;
- - setAxisX:(int) anInt;
- - (int) axisX;
- - setAxisY:(int) anInt;
- - (int) axisY;
-
- - setIsLogCoord:(int)coord isOn:(BOOL)isOn;
- - (BOOL)isLogCoord:(int)coord;
-
- - setTitle:(const char *) aString;
- - (const char *) title;
- - setLabelCoord:(int)coord to:(const char *) aString;
- - (const char *) labelCoord:(int) coord;
-
- - setDummyVar:(int)coord to:(const char *)aString;
- - (const char *)dummyVar:(int)coord;
-
- - setAppendix:(const char *) aString;
-
- - setFontsize:(int) anInt;
- - (int) fontsize;
- - setFontname:(const char *) aString;
- - (const char *) fontname;
- - setFont:aFont; /* Sets fontname and fontsize from aFont */
- - font; /* Returns a Font object */
-
- - setKey:(BOOL) cond;
- - (BOOL) key;
- - setKeyDefault: (BOOL) cond;
- - (BOOL) keyDefault;
- - setKeyCoord:(int)coord to:(double)aDouble;
- - (double) keyCoord:(int)coord;
-
- - setTime:(BOOL) cond;
- - (BOOL) time;
- - setTimeDefault: (BOOL) cond;
- - (BOOL) timeDefault;
- - setTimeCoord:(int)coord to:(int)anInt;
- - (int) timeCoord:(int)coord;
-
- - setSizeProp:(BOOL) cond;
- - (BOOL) sizeProp;
- - setSizeX:(float) xFloat Y:(float) yFloat;
- - (float) sizeX;
- - (float) sizeY;
-
- - setRotCoord:(int)coord to:(float)aFloat;
- - resetRotation;
- - (float)rotCoord:(int)coord;
-
- - setSamplesCoord:(int)coord to:(int) anInt;
- - (int) samples:(int)coord;
-
- - setIsoSamplesCoord:(int)coor to:(int) anInt;
- - (int) isoSamples:(int)coord;
-
- - setAutoscaleCoord:(int)coord isOn:(BOOL)cond;
- - (BOOL)autoscaleCoord:(int)coord;
-
- - setRangeCoord:(int)coord min:(double)min max:(double)max;
- - (double)minCoord:(int)coord;
- - (double)maxCoord:(int)coord;
-
- - setDegrees:(BOOL) cond;
- - (BOOL)degrees;
-
- - buildPlotargs;
- - (const char *) plotargs;
-
- - (List *)functions;
-
- @end
-