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:


The parameter gr_win_flags can be a combination of the following as described in the GrWinFlags enum:
GR_REDRAWRedraw 3D graph without recomputing.
GR_DIRTYThe current graph needs to be recomputed.
TAB_DIRTYThe current table needs to be recomputed.
GR_ADD_TOAdd a function to the current graph without recomputing.
GR_OPENThe current graph window is open.
GRAPH_FOLDERThe temporary folder for functions created by the Graph and Table commands exists.
EYE_DIRTYThe eye of the 3D graph has changed.
GR_SHADE_NO_PANThe panning is not valid after shading.
FLDPIC_DIRTYThe system variable fldpic needs to be recomputed.

The parameter graph_mode can be one of the following as described in the GraphModes enum:
GR_FUNCFUNCTION mode.
GR_PARPARAMETRIC mode.
GR_POLPOLAR mode.
GR_SEQSEQUENCE mode.
GR_3D3D mode.
GR_DEDIFF EQUATIONS mode.

The parameter gr_side can be one of the following as described in the GrSides enum:
AP_SIDE_ATop or left split.
AP_SIDE_BBottom or right split.
AP_SIDE_UNKNOWNUnknown.

The parameter gr_shade_pat can be one of the following as described in the Attrs enum:
A_SHADE_VVertical shade pattern.
A_SHADE_HHorizontal shade pattern.
A_SHADE_NSNegative slope 45° shade pattern.
A_SHADE_PSPositive slope 45° shade pattern.

The parameter tbl_flags can be one of the following as described in the TableFlags enum:
TBL_CONNECT_TRCSet when Graph<->Table = ON.
TBL_INDEP_ASKSet when Independent = ASK.
TBL_NO_MODE_CHANGESet when executing the DispTbl command.