| GR_WIN_VARS | Type (Structure)

graphing.h, unknown.h

typedef struct {
| float flt_xcursor; /* Graph system variable xc */
| float flt_ycursor; /* Graph system variable yc */
| float flt_zcursor; /* Graph system variable zc */
| float flt_tcursor; /* Graph system variable tc */
| float flt_rcursor; /* Graph system variable rc */
| float flt_thetacursor; /* Graph system variable θc */
| float flt_ncursor; /* Graph system variable nc */
| float recip_delx; /* 1/Δx rounded to 6 significant digits */
| float recip_dely; /* 1/Δy rounded to 6 significant digits */
| float orgxmin; /* Original xmin, before any panning has occurred */
| float orgxmax; /* Original xmax, before any panning has occurred */
| float panshift; /* Number of columns panned from orgxmin */
| float orgtblst; /* Original tblStart, before any scrolling has occurred */
| float tblshift; /* Number of lines scrolled in table */
| float tblstart; /* Table system variable tblStart */
| float deltatbl; /* Table system variable Δtbl */
| float *rngp; /* Pointer to current Window variables array */
| float PrevRange[12]; /* Current ZoomPrev values */
| float UserRange[29]; /* Current ZoomSto values */
| GR_MODES *gr_modep; /* Pointer to GR_MODES struct for current graph */
| WINDOW *grwinp; /* Pointer to current Graph app WINDOW struct */
| WINDOW *rngwinp; /* Pointer to current Window Editor app WINDOW struct */
| WINDOW *tblwinp; /* Pointer to current Table app WINDOW struct */
| TABLE_WIN_VARS *tableptr; /* Pointer to internal Table app data */
| union {
| struct {
| EQU_DS_AMS1 equedDS; /* Internal Y= Editor app data */
| unsigned short curinc; /* Graph iteration counter */
| unsigned short curincy; /* 3D y trace mode iteration counter */
| unsigned short tblindx; /* Index of tblInput element at top of Table */
| short yaxispix; /* Pixel number of y axis for panning */
| unsigned short TBL_WidthLimit; /* Format width for Table app */
| HANDLE zval; /* Handle of the 3D z value array */
| DB3 DB3z; /* 3D function spin database */
| HANDLE htbinput; /* Handle of the table system variable tblInput */
| HANDLE hfldpic; /* Handle of the graph system variable fldpic */
| unsigned short gr_win_flags; /* Graph app flags */
| unsigned char xmaxpix; /* Rightmost column used by graph in current window */
| unsigned char ymaxpix; /* Bottom row used by graph in current window */
| unsigned char gr_ref_mask; /* Graph reference flag mask for current graph */
| unsigned char graph_mode; /* Graph mode of current graph */
| unsigned char gr_side; /* Graph window location */
| unsigned char gr_folder_cnt; /* Number of functions created by the TI-BASIC Graph and Table commands */
| unsigned char gr_shade_pat; /* Shade pattern */
| unsigned char rng_xpix; /* Maximum x pixel number on Window Editor screen */
| unsigned char rng_ypix; /* Maximum y pixel number on Window Editor screen */
| unsigned char tbl_flags; /* Table app flags */
| unsigned char tbl_par_flags; /* Internal Table app flags */
| unsigned char gr_top_flags; /* Internal Graph app flags */
| unsigned char ValidCursBits; /* Internal Graph app flags */
| signed char de_twopass; /* Internal Graph app flags */
| FUNCID CurFunc; /* Data for currently selected function for tracing */
| unsigned char PrevZoomMode; /* Graph mode of current ZoomPrev values */
| } ams1;
| struct {
| EQU_DS equedDS; /* Internal Y= Editor app data */
| unsigned short curinc; /* Graph iteration counter */
| unsigned short curincy; /* 3D y trace mode iteration counter */
| unsigned short tblindx; /* Index of tblInput element at top of Table */
| short yaxispix; /* Pixel number of y axis for panning */
| unsigned short TBL_WidthLimit; /* Format width for Table app */
| HANDLE zval; /* Handle of the 3D z value array */
| DB3 DB3z; /* 3D function spin database */
| HANDLE htbinput; /* Handle of the table system variable tblInput */
| HANDLE hfldpic; /* Handle of the graph system variable fldpic */
| unsigned short gr_win_flags; /* Graph app flags */
| unsigned char xmaxpix; /* Rightmost column used by graph in current window */
| unsigned char ymaxpix; /* Bottom row used by graph in current window */
| unsigned char gr_ref_mask; /* Graph reference flag mask for current graph */
| unsigned char graph_mode; /* Graph mode of current graph */
| unsigned char gr_side; /* Graph window location */
| unsigned char gr_folder_cnt; /* Number of functions created by the TI-BASIC Graph and Table commands */
| unsigned char gr_shade_pat; /* Shade pattern */
| unsigned char rng_xpix; /* Maximum x pixel number on Window Editor screen */
| unsigned char rng_ypix; /* Maximum y pixel number on Window Editor screen */
| unsigned char tbl_flags; /* Table app flags */
| unsigned char tbl_par_flags; /* Internal Table app flags */
| unsigned char gr_top_flags; /* Internal Graph app flags */
| unsigned char ValidCursBits; /* Internal Graph app flags */
| signed char de_twopass; /* Internal Graph app flags */
| FUNCID CurFunc; /* Data for currently selected function for tracing */
| unsigned char PrevZoomMode; /* Graph mode of current ZoomPrev values */
| } ams2;
| };
} GR_WIN_VARS;

Structure defining data for the graph related apps.

GR_WIN_VARS is a structure which contains most of the data used by the Graph Application and other graph-related apps.
Caution: This structure is different on AMS 1.xx and AMS 2.xx (34 bytes bigger on AMS 2.xx, see WINDOW_AMS1 for a more detailed explanation)!
There are two main GR_WIN_VARS structures in the calculator which are pointed by gr_active and gr_other. In most cases, you will not have to create a GR_WIN_VARS structure, and therefore the GR_WIN_VARS will only be useful to access data pointed to by gr_active or gr_other.
None of the data contained in the GR_WIN_VARS struct should be changed directly, but it can be accessed for use. System routines may be called to change many items (for example, VarStore may be used to change the graph system variables), but some data is for internal use only and should only be changed by the appropriate system app.
Here is an explanation of all the special structure members:
The size of the rngp array and the meaning of the elements depend on the current graphing mode (see GraphModes and rngLen). It can point to one of the following sets of indices, as described in the WinVarEnum enum:

- FUNCTION mode indices:

  GR_XMIN | System variable xmin.
  GR_XMAX | System variable xmax.
  GR_XSCL | System variable xscl.
  GR_YMIN | System variable ymin.
  GR_YMAX | System variable ymax.
  GR_YSCL | System variable yscl.
  GR_DELTAX | System variable Δx.
  GR_DELTAY | System variable Δy.
  GR_XRES | System variable xres.

- PARAMETRIC mode indices:

  GR_XMIN | System variable xmin.
  GR_XMAX | System variable xmax.
  GR_XSCL | System variable xscl.
  GR_YMIN | System variable ymin.
  GR_YMAX | System variable ymax.
  GR_YSCL | System variable yscl.
  GR_DELTAX | System variable Δx.
  GR_DELTAY | System variable Δy.
  GR_TMIN | System variable tmin.
  GR_TMAX | System variable tmax.
  GR_TSTEP | System variable tstep.

- POLAR mode indices:

  GR_XMIN | System variable xmin.
  GR_XMAX | System variable xmax.
  GR_XSCL | System variable xscl.
  GR_YMIN | System variable ymin.
  GR_YMAX | System variable ymax.
  GR_YSCL | System variable yscl.
  GR_DELTAX | System variable Δx.
  GR_DELTAY | System variable Δy.
  GR_THETMIN | System variable θmin.
  GR_THETMAX | System variable θmax.
  GR_THETSTEP | System variable θstep.

- SEQUENCE mode indices:

  GR_XMIN | System variable xmin.
  GR_XMAX | System variable xmax.
  GR_XSCL | System variable xscl.
  GR_YMIN | System variable ymin.
  GR_YMAX | System variable ymax.
  GR_YSCL | System variable yscl.
  GR_DELTAX | System variable Δx.
  GR_DELTAY | System variable Δy.
  GR_NMIN | System variable nmin.
  GR_NMAX | System variable nmax.
  GR_NPLOT | System variable plotStrt.
  GR_NSTEP | System variable plotStep.

- 3D mode indices:

  GR_XMIN | System variable xmin.
  GR_XMAX | System variable xmax.
  GR_XGRID | System variable xgrid.
  GR_YMIN | System variable ymin.
  GR_YMAX | System variable ymax.
  GR_YGRID | System variable ygrid.
  GR_DELTAX | Internal data.
  GR_DELTAY | Internal data.
  GR_ZMIN | System variable zmin.
  GR_ZMAX | System variable zmax.
  GR_ZSCL | System variable zscl. (Note that zscl is not used on the TI-89, TI-89 Titanium, TI-92 Plus or Voyage 200.)
  GR_EYE_THETA | System variable eyeθ.
  GR_EYE_PHI | System variable eyeΦ.
  GR_EYE_PSI | System variable eyeΨ.
  GR_NCONTOUR | System variable ncontour.
  GR_XSCALE | Internal data.
  GR_YSCALE | Internal data.
  GR_ZSCALE | Internal data.

- DIFF EQUATIONS mode indices:

  GR_XMIN | System variable xmin.
  GR_XMAX | System variable xmax.
  GR_XSCL | System variable xscl.
  GR_YMIN | System variable ymin.
  GR_YMAX | System variable ymax.
  GR_YSCL | System variable yscl.
  GR_DELTAX | System variable Δx.
  GR_DELTAY | System variable Δy.
  GR_T0 | System variable t0.
  GR_TMAX | System variable tmax.
  GR_TSTEP | System variable tstep.
  GR_TPLOT | System variable tplot.
  GR_DIFTOL | System variable diftol.
  GR_ESTEP | System variable Estep.
  GR_FLDRES | System variable fldres.
  GR_NCURVES | System variable ncurves.
  GR_DTIME | System variable dtime.

The parameter gr_win_flags can be a combination of the following as described in the GrWinFlags enum:

GR_REDRAW | Redraw 3D graph without recomputing.
GR_DIRTY | The current graph needs to be recomputed.
TAB_DIRTY | The current table needs to be recomputed.
GR_ADD_TO | Add a function to the current graph without recomputing.
GR_OPEN | The current graph window is open.
GRAPH_FOLDER | The temporary folder for functions created by the Graph and Table commands exists.
EYE_DIRTY | The eye of the 3D graph has changed.
GR_SHADE_NO_PAN | The panning is not valid after shading.
FLDPIC_DIRTY | The system variable fldpic needs to be recomputed.

The parameter graph_mode can be one of the following as described in the GraphModes enum:

GR_FUNC | FUNCTION mode.
GR_PAR | PARAMETRIC mode.
GR_POL | POLAR mode.
GR_SEQ | SEQUENCE mode.
GR_3D | 3D mode.
GR_DE | DIFF EQUATIONS mode.

The parameter gr_side can be one of the following as described in the GrSides enum:

AP_SIDE_A | Top or left split.
AP_SIDE_B | Bottom or right split.
AP_SIDE_UNKNOWN | Unknown.

The parameter gr_shade_pat can be one of the following as described in the Attrs enum:

A_SHADE_V | Vertical shade pattern.
A_SHADE_H | Horizontal shade pattern.
A_SHADE_NS | Negative slope 45° shade pattern.
A_SHADE_PS | Positive slope 45° shade pattern.

The parameter tbl_flags can be one of the following as described in the TableFlags enum:

TBL_CONNECT_TRC | Set when Graph<->Table = ON.
TBL_INDEP_ASK | Set when Independent = ASK.
TBL_NO_MODE_CHANGE | Set when executing the DispTbl command.