next up previous contents
Next: The Text Window Up: Tina Windows Previous: Choice Lists   Contents

Value Items

These allow the input of parameter values as text items. Items are integer, floats (which means doubles), and strings.

Value items come in two styles. The first asks the user to provide a pointer to the variable whose value is to be updated. The second uses user provided get and set functions to update a hidden variable.

Any change to the text item automatically updates the variable value if it is meaningful.

Global integer, float and string value items are set up by calls to

void *tw_iglobal(char *name, int *ptr, int nchars)

void *tw_fglobal(char *name, double *ptr, int nchars)

void *tw_sglobal(char *name, char *ptr, int nchars)

Remember that the pointers must point to accessible memory (in particular p_char must point to enough memory to hold the length of strings required).

Get and set integer, float and string value items are set up by calls to

void *tw_ivalue(char *name, int (*get) ( /* ??? */ ),
                void (*set) ( /* ??? */ ), int nchars)

void *tw_fvalue(char *name, double (*get) ( /* ??? */ ),
                void (*set) ( /* ??? */ ), int nchars)

void *tw_svalue(char *name, char *(*get) ( /* ??? */ ),
                void (*set) ( /* ??? */ ), int nchars)

Any change to the items in the text item automatically calls the appropriate set function. Initial values are provided by the get function.

Initial values in value items are specified by the initial pointer or get function. Again make sure this corresponds to the state of your application. To reset parameters which calculated internally to the algorithm software use the funtions

void    tw_fglobal_reset(void *ptwc)

void    tw_iglobal_reset(void *ptwc)

void    tw_sglobal_reset(void *twc) ;


next up previous contents
Next: The Text Window Up: Tina Windows Previous: Choice Lists   Contents
root 2017-11-18