home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_GEN
/
FACETV.ZIP
/
FACE_BOX.MEN
< prev
next >
Wrap
Text File
|
1994-01-05
|
30KB
|
1,184 lines
/************************************************************************
**
** @(#)face_box.men 01/05/94 Chris Ahlstrom
**
** C/C++ compatible. Consists of four sections:
**
** 0. A bunch of include files for various dialog boxes added to
** help test the newest, truest, latest, greatest features.
**
** 1. The DAC (D/A converter) Parameters dialog box, stolen from
** the mod_dac modules of MODAPP, used here purely as a test
** bed for dialog box control. This is a good test of the
** general data scheme.
**
** 2. We also provide a section showing how to use the MappedField
** elements of tv_menu.h. Here, the setup is a little more
** complex and indirect.
**
** 3. The experimental parameters dialog box copped from the
** mod_exp modules of MODAPP. Just includes a few more type
** of data than item 1.
**
** Also see FACE_BOX.H please.
**
** Each of the items here must have all of the following elements
** taken care of (placed somewhere below):
**
** 1. The typedef
**
** 2. Initialization data
**
** 3. The menu specification array
**
** 4. A place for the item in the equipmentList[], if
** desired.
**
*************************************************************************/
#if !defined(FACE_BOX_men) /* { FACE_BOX_men */
#define FACE_BOX_men
#include "face_box.h" /* define structures and #defines */
/************************************************************************
** Item 0:
**
** DelayParameters
**
*************************************************************************/
#include "x_delay.h" /* DelayParameters */
DelayParameters delayData =
{
"test mAFC tasks", /* descriptive name */
{
100, /* delay before the interval */
2000, /* delay for the stimulus */
0, /* delay between intervals */
1000, /* delay showing feedback */
0 /* extra delay */
},
100, /* use 100% of delays */
0 /* base for timer set */
};
#include "x_delay.men" /* DelayParameters dialog setup */
/************************************************************************
** Item 1: DAC Parameters
*************************************************************************/
#define XXX 0 /* program will fill this in */
#define DAC_TOP 2 /* handy alignment row */
#define DAC_LEFT 4 /* left handy alignment column */
#define DAC_LEFT2 1 /* relative location of data boxes */
#define DAC_LEFT3 14 /* relative location on same line */
#define DAC_RIGHT 26 /* right handy alignment column */
#define DAC_RIGHT2 20 /* relative location of data boxes */
#define DAC_RIGHT3 6 /* relative location on same line */
#define DAC_RIGHT4 14 /* relative location on same line */
#define DAC_RIGHT5 1 /* relative location of data boxes */
/************************************************************************
** IGNORED
**
** Defined to make it clear that the current entry refers to
** a ExtendedField, so that the four fields encapsulated herein are
** not used.
**
** I wish there was a way to better do this without screwing up
** old code or making things seem more complex to the befuddled
** programmer who's reading Chris's code.
**
*************************************************************************/
#define IGNORED NULL, 0.0, 0.0, NULL
/************************************************************************
** DACParameters dacDialog
*************************************************************************/
DACParameters dacDialog = /* dialog-box (was DACmod) */
{
DT2801_DEVICE, /* default signal generator */
"Regular string!", /* nickname for the signal generator */
"Byte---string!", /* bogus test string */
10000.0, /* DAC sampling rate */
10000, /* no number of points yet */
YES, /* testCode for testing the code */
"Scrollable string",/* a good test of the SCROLL_END feature */
0, /* default startpoint is first integer */
0.0, /* which corresponds to 0 usec */
4096, /* there is no default endpoint, but it will */
100.0, /* correspond to this ending time in usec */
MIN_DAC_OUTPUT, /* minimum integer represented */
MIN_DAC_VOLTAGE, /* it corrsponds to negative of the max */
MAX_DAC_OUTPUT, /* maximum integer, controls */
MAX_DAC_VOLTAGE, /* maximum is 10V peak */
1000.0, /* calibration frequency */
10.0 /* calibration voltage */
};
/************************************************************************
** A couple of mouse/key/numeric mappings for demonstration
*************************************************************************/
static MouseMap defaultMouse =
{
LINEAR, /* the type of mapping */
24000, /* highest mouse unit to use */
1000, /* highest key unit to use */
showFloatInBox /* sample control function */
};
static MouseMap fastMouse =
{
LINEAR, /* the type of mapping */
1000, /* get to the top faster! */
100, /* get to the top faster! */
NULL /* no control function */
};
/************************************************************************
** The following array must parallel the DeviceType enum in face_box.h
** The size-#defines are no longer necessary, as the size of
** dacButtons can be calculated at run time.
*************************************************************************/
static char *dacButtons[] =
{
"~D~T-2801A",
"~N~ucleus [N/A]",
"~L~SPSS [N/A]",
"~T~est Device",
"Device ~M~issing",
NULL
};
/************************************************************************
** The following ExtendedDescriptor array is a sample, intended for
** use in three of the dialog box fields described below.
*************************************************************************/
ExtendedDescriptor dacByteList[] =
{
{
DAC_FLOAT, /* The ExtendedField involved */
Float, /* how to display/edit it */
{ 4.0, 40.0 } /* range used by user */
},
{
DAC_INTEGER,
Integer,
{ 1.0, 20.0 }
},
{
DAC_UNSIGNED_BYTE,
UnsignedByte,
{ 4.0, 40.0 }
}
};
/************************************************************************
** dacArray[]
**
** A demonstration of how to set up a pretty complex dialog box
** that consists of MenuFields.
**
** Each element (next-to-outermost curly brackets) in the following
** array must parallel each field in the DacParameters structure in
** face_box.h.
**
** Note that some of the labels have a character bracketed by
** the "~" character, as in "~D~AC Device". This makes the character
** a HOT-KEY for Turbo Vision; it can be accessed by pressing that
** character (if no other field has yet been entered) or by press that
** character with the Alt key (it is better to get used to doing this).
**
** Let's discuss some of the elements (each is a MenuField, as
** described fully in tv_menu.h) used to build a dialog box.
**
** [0] device
**
** TextLabel
**
** This structure-within-a-structure provides the string
** label for the dialog box [string] , the location of the label
** [location]. The label size is dictated by the string [see
** tbox.cpp] and both dimensions are calculated at run-time.
**
** The TextLabels are of the same nature for the rest of the
** MenuFields, so we won't describe them any further.
**
** TextData
**
** This structure is more complex. It has many fields, and
** a union that depends on the data-type.
**
** dtmplate A string that dictates the number of characters
** to be used for holding the data. This string
** can also be used as a buffer, by a user routine.
**
** location Locates the data-box *relative* to the label.
** My habit is to locate button-boxes just below
** the label, left-aligned with the label. Hence, I could have used
** location = {1, 1} [one character over, and one line down]. But,
** for some reason, I used a macro to help align it horizontally.
**
** datatype Here, we specify that the data is to be shown
** as a Turbo Vision radio button (TRadioButtons)
** box. Since we used this datatype [Radiobox], the following
** field two fields are irrelevant, and the spec field must specify
** a list of strings.
**
** format Not relevant for buttons.
**
** code The range is determined by the number of items,
** so here, the code range is unnecessary.
**
** spec.strings This is a union member, specifying strings.
**
** [1] name
**
** The only new wrinkle here is that we don't need a list of
** strings, so the spec field is not present [actually, it is,
** but has a NULL value].
**
** dtmplate totally determines the length of the string. The format
** field better match dtmplate, or trouble [bad trouble] will brew!
**
** [2] max
**
** This field is a ByteString, which means it doesn't use a '\0'
** terminator. This kind of string is necessary when the device
** supported has a strict format for any string data... that is,
** when the string is always the same size.
**
** dtmplate totally determines the length of the string. The format
** field better match dtmplate, or trouble [bad trouble] will brew!
**
** [3] output_rate
**
** This field is very special, in that it is Extended. This means
** that the internal number is to be converted to a different
** format before being shown to the user. Each program can set
** up one set of mapped data-types.
**
** Two external things must be set up... first, a list of integers,
** one for each kind of conversion that could occur. For an example,
** see the DacByte enum type in face_box.h. Second, an *exactly*
** corresponding list of ExtendedDescriptor structures. See
** dacByteList[] defined way above here.
**
** So, we have a spec value which is an integer, DAC_FLOAT, taken
** from the DacByte enum type. Since it indirectly points to
** a ExtendedDescriptor, no further information is necessary.
** Note that, since it is a union member, we have to cast it to the
** type of the first member of the union, in order to define it
** without getting a compiler error.
**
** [4] nPoints
**
** Very similar to output_rate, but using a mapping of integers.
** Note that there is a potential problem. The code range is
** 1000-20000, but the user range is only 1 to 20 (a factor of
** 1000 less). So, when an up- or down-arrow occurs, the code is
** incremented by, say, 25, to go from 10000 to 10025. But, when
** converted back to user units, it stays at 10. So you can't
** change the value with the keystroke. The mouse code works fine.
** See tinpmous.cpp [TInputFloat::handleEvent()] for possible
** solutions.
**
** Anyway, for integers, we would have to recommend not using
** such a large re-mapping factor [1000 is too big], unless
** you really only care about using the mouse.
**
** [6] note
**
** A test of the SCROLL_END feature... note the appearance of
** the SCROLL_END_CHAR (\xFF) code, which informs banner_size()
** [called from doDialog()] how short the box should be, without
** affecting the total length of the template string as determined
** by strlen().
**
** THE FOLLOWING IS NO LONGER USED, because I want to test the SCROLL_END
** feature more at the moment. However, the code still appears,
** commented out.
**
** [6] dacRate
**
** Very similar to output_rate, but using a mapping of bytes.
**
** [7] pt_Start
**
** Here, we have a simple integer field. Note that all the formats,
** templates, and ranges must be consistent, otherwise weird
** crashes will occur.
**
** [15] calibFreq
**
** This field is of data-type FloatControl, which means the spec
** points to a MouseMap structure. A FloatControl variable
** can be altered on the fly by using the mouse or the keyboard.
** For an example of a MouseMap structure, see defaultMouse above.
** Note that, since it is a union member, we have to cast it to the
** type of the first member of the union, in order to define it
** without getting a compiler error.
**
** [16] calibVolt
**
** Similar, but points to a different MouseMap structure.
**
*************************************************************************/
MenuField dacArray[] =
{
{ /* device */
{ /* TextLabel */
"~D~AC Device", /* string */
{ DAC_LEFT, DAC_TOP } /* location */
},
{ /* TextData */
"0", /* dtmplate */
{ DAC_LEFT2, 1 }, /* location */
Radiobox, /* datatype */
"%-1s", /* format */
{ 0.0, 99999.0 }, /* code (a range) */
dacButtons /* spec (strings) */
}
},
{ /* name */
{
"~N~ame",
{ DAC_RIGHT, DAC_TOP }
},
{ /* here, length is 15 */
"DT-2801A ", /* chars + 1 for '\0' */
{ 6, 0 },
String,
"%-15s"
}
},
{ /* max */
{
"~B~yte",
{ DAC_RIGHT, DAC_TOP+1 }
},
{ /* here, length is 15, */
"Byte String----", /* but still use 15 here*/
{ 6, 0 },
ByteString,
"%-15s",
}
},
{ /* output_rate */
{
"~O~utput DAC Rate kHz",
{ DAC_RIGHT, DAC_TOP+2 }
},
{
"10.0",
{ DAC_RIGHT2+1, 0 },
Extended, /* use extended datatype*/
"%4.1f",
{ 4000.0, 40000.0 }, /* code range */
(char **) DAC_FLOAT /* spec (ExtendedField) */
}
},
{ /* nPoints */
{
"~K~ilo-Points",
{ DAC_RIGHT, DAC_TOP+3 }
},
{
"10",
{ DAC_RIGHT2+1, 0 },
Extended, /* use extended datatype*/
"%2d",
{ 1000.0, 20000.0 },
(char **) DAC_INTEGER /* special limited int */
}
},
{ /* savecode */
{
"~S~ave to file?",
{ DAC_RIGHT, DAC_TOP+4 }
},
{
"Y", /* irrelevant (Radiobox)*/
{ DAC_RIGHT5, 1 },
Radiobox,
"%1s", /* irrelevant (Radiobox)*/
{ 0.0, 1.0 },
YesNoButtons
}
},
/*------------------------------------------------------------------*/
#ifdef USE_DACRATE_CODE_INSTEAD
{ /* dacRate */
{
"~i~nt rate kHz",
{ DAC_LEFT, DAC_TOP+7 }
},
{
"00",
{ DAC_LEFT3, 0 },
Extended, /* use extended datatype*/
"%2d",
{ 4000.0, 40000.0 },
(char **) DAC_UNSIGNED_BYTE /* special limited char */
}
},
#else
{ /* dacRate */
{
"~L~ong note",
{ DAC_LEFT, DAC_TOP+7 }
},
{
/*
** Each line here is 40 characters, for a total of 120.
*/
"Type anything of interest..." SCROLL_END_CHAR " Note that "
"we have 120 characters (NOTESIZE), but w"
"we only display up to SCROLL_END_CHAR!!!",
{ DAC_LEFT3, 0 },
String, /* use extended datatype*/
"%-120s" /* doesn't matter!!! */
}
},
#endif
{ /* pt_start */
{
"Start pt.",
{ DAC_LEFT, DAC_TOP+8 }
},
{
"00000",
{ DAC_LEFT3, 0 },
Integer,
"%5d",
{ 0.0, 16384.0 }
}
},
{ /* us_start */
{
"msec",
{ DAC_RIGHT, DAC_TOP+8 }
},
{
"0000.0",
{ DAC_RIGHT3, 0 },
Float,
"%6.1f",
{ 0.0, 16000.0 }
}
},
{ /* pt_end */
{
"End pt.",
{ DAC_LEFT, DAC_TOP+9 }
},
{
"00000",
{ DAC_LEFT3, 0 },
Integer,
"%5d",
{ 0.0, 16384.0 }
}
},
{ /* us_end */
{
"msec",
{ DAC_RIGHT, DAC_TOP+9 }
},
{
"0000.0",
{ DAC_RIGHT3, 0 },
Float,
"%6.1f",
{ 0.0, 16000.0 }
}
},
{ /* dacMin */
{
"Min level",
{ DAC_LEFT, DAC_TOP+10 }
},
{
"-00000",
{ DAC_LEFT3, 0 },
Integer,
"%6d",
{ -32767.0, 32767.0 }
}
},
{ /* mVMin */
{
"mV",
{ DAC_RIGHT, DAC_TOP+10 }
},
{
"-00000.0",
{ DAC_RIGHT3, 0 },
Float,
"%8.1f",
{ -10000.0, 10000.0 }
}
},
{ /* dacMax */
{
"Max level",
{ DAC_LEFT, DAC_TOP+11 }
},
{
"-00000",
{ DAC_LEFT3, 0 },
Integer,
"%6d",
{ -32767.0, 32767.0 }
}
},
{ /* mVMax */
{
"mV",
{ DAC_RIGHT, DAC_TOP+11 }
},
{
"-00000.0",
{ DAC_RIGHT3, 0 },
Float,
"%8.1f",
{ -10000.0, 10000.0 }
}
},
{ /* calibFreq CONTROL */
{
"~F~req CONTROL",
{ DAC_LEFT, DAC_TOP+13 }
},
{
"10000.0",
{ DAC_LEFT3, 0 },
FloatControl, /* datatype */
"%7.1f",
{ 0.0, 28000.0 },
(char **) &defaultMouse /* spec (MouseMap *) */
}
},
{ /* calibVolts CONTROL */
{
"~V~olt CONTROL",
{ DAC_RIGHT, DAC_TOP+13 }
},
{
"00.0",
{ DAC_RIGHT4, 0 },
FloatControl,
"%4.1f",
{ 0.0, 10.0 },
(char **) &fastMouse
}
}
};
MainBox dacMenu = /* the whole picture! */
{
{ /* box */
"Bogus Device Parameters", /* title */
NULL, /* string */
{ 11, 2 }, /* location */
{ 56, 20 }, /* size */
{ 2, 2 } /* labelloc */
},
sizeof(dacArray)/sizeof(MenuField), /* number of fields */
dacArray /* the array of fields */
};
/************************************************************************
** Item 2: MappedField test section
*************************************************************************/
#define MID_TOP 2 /* handy alignment row */
#define MID_LEFT 4 /* left handy alignment column */
#define MID_LEFT2 1 /* relative location of data boxes */
#define MID_LEFT3 12 /* relative location on same line */
/************************************************************************
** MIDParameters midDialog
*************************************************************************/
MIDParameters midDialog =
{
"Test name\0", /* name[10] */
120, /* tempo */
-64, /* pan */
0 /* part */
};
/************************************************************************
** A sample list of labels for a button-box
*************************************************************************/
char *partList[] =
{
"~1~",
"~2~",
"~3~",
"~4~",
"~5~",
"~6~",
"~7~",
"~8~",
NULL
};
/************************************************************************
** The following MappedFieldDescriptor array is a sample, intended for
** use in three of the dialog box fields described below.
*************************************************************************/
MappedFieldDescriptor midByteList[] =
{
{ /* BYTE */
MID_BYTE, /* type */
"0xFE", /* dtmplate */
UnsignedByte, /* datatype */
{ 0.0, 240.0 }, /* code */
{ 0.0, 120.0 }, /* user */
"0x%2.2x", /* format */
NULL_STRING /* strings */
},
{ /* SBYTE */
MID_SBYTE,
"-123",
SignedByte,
{ -127.0, 127.0 },
{ -10.0, 10.0 },
"%4d",
NULL_STRING
},
{ /* MString */
MID_STRING,
"1234567890",
ByteString,
{ 0.0, 0.0 },
{ 0.0, 0.0 },
"%-10s",
NULL_STRING
},
{ /* Part */
MID_PART,
NULL,
Radiobyte,
{ 0.0, 7.0 },
{ 0.0, 7.0 },
NULL_FORMAT,
partList
}
};
/************************************************************************
** The following array must parallel midDialog
*************************************************************************/
MappedField midArray[] =
{
{ /* name */
"~N~ame", /* label_string */
{ MID_LEFT, MID_TOP }, /* label_location */
{ MID_LEFT3, 0 }, /* data_location */
MID_STRING /* dtype */
},
{ /* tempo */
"~T~empo",
{ MID_LEFT, MID_TOP+1 },
{ MID_LEFT3, 0 },
MID_BYTE
},
{ /* pan */
"~P~an",
{ MID_LEFT, MID_TOP+2 },
{ MID_LEFT3, 0 },
MID_SBYTE
},
{ /* part */
"Part",
{ MID_LEFT, MID_TOP+4 },
{ MID_LEFT2, 1 },
MID_PART
}
};
MappedBox midMenu = /* the whole picture! */
{
{ /* box */
"Bogus MIDI Parameters", /* title */
NULL, /* string */
{ 11, 2 }, /* location */
{ 32, 20 }, /* size */
{ 2, 2 } /* labelloc */
},
sizeof(midArray)/sizeof(MappedField), /* number of fields */
midArray /* the array of fields */
};
/************************************************************************
** Item 3: EXP Parameters
*************************************************************************/
#define EXP_TOP 2
#define EXP_LEFT 2
#define EXP_LEFT2 1
#define EXP_RIGHT 33
#define EXP_RIGHT2 18
#define EXP_RIGHT3 1
ExpParameters expDialog =
{
MOD_DEPTH_EXP,
DISCRIMINATION_EXP, /* discriminate the two waveforms */
MOUSE_RESPONSE, /* use mouse buttons as response device */
3, /* number of hits to cause a reduction */
2, /* number of intervals in the task */
12, /* number of reversals allowed */
NUMB_OUT, /* number of reversals for step change */
10L, /* need to test LongInteger problems! */
0.0, /* initial step size */
0.0, /* half-step step size */
0.0, /* floor value for signal parameter */
0.0, /* ceiling value for signal parameter */
CHECK_NO, /* tracking of stimulus values */
CHECK_NO, /* peeking at presentation intervals */
CHECK_NO, /* peeking at noise sample indexes */
STEP_LINEAR, /* stimulus levels linearity */
STEP_LINEAR /* step-size levels linearity */
};
/************************************************************************
** Various buttons
**
** Previously, the following fields were implemented as Yes/No
** RadioButtons. These take up too much space. Instead, I could have
** implemented these flags as one CheckBox. But this would have
** required a lot of recoding. So, I just converted these to one-line
** CheckBoxes. Note that, just for good looks, I made each string
** exactly the same length... this creates the illusion that they
** are all part of one variable... the user doesn't care about this,
** but a second-generation programmer, maintaining this code, might
** have occasion to grumble!
**
** allB_size and allB_L are old constructs, and could be removed.
** Sizes are now calculated on the fly by some boxtools.cpp routines.
**
*************************************************************************/
static char *stimButtons[] = { "Stimulus peek ", NULL };
static char *intvButtons[] = { "Value tracking ", NULL };
static char *noiseButtons[] = { "Noise index peek", NULL };
#define allB_size (sizeof(stimButtons)/sizeof(char *)-1)
#define allB_L (16+6)
/***********************************************************************
** ExperimentType values
**
** The following three structures must all be edited in parallel, and
** must correspond to the ExperimentType enum in mod_type.h
**
************************************************************************/
#if !defined(EXP_BUTTONS)
#define EXP_BUTTONS
char *expButtons[] =
{
"~I~ntensity",
"~F~requency",
"~D~uration",
"~P~ulse Duration",
"~G~ap Detection",
"~M~odulation Depth",
"Modulation F~r~eq",
"Modulation P~h~ase",
NULL
};
#define eB_size (sizeof(expButtons)/sizeof(char *)-1)
#define eB_L (16+6)
#endif
char *expTitles[] =
{
"Generic or User-defined Experiment",
"Intensity Discrimination",
"Frequency Discrimination"
"Duration Discrimination",
"Pulse Width Discrimination",
"Gap Discrimination",
"Modulation Discrimination",
"Modulation Frequency Discrimination",
"Modulation Phase Discrimination",
NULL
};
#if !defined(EXP_VARS)
#define EXP_VARS
char *expVars[] =
{
" Generic Record (??): ",
" Intensity Record (dB): ",
" Frequency Record (Hz): ",
" Duration Record (ms): ",
" Pulse Width (us/ph): ",
" Gap Record (ms): ",
" Modulation Record (%): ",
" Modulation Freq. (Hz): ",
"Modulation Phase (deg): ",
NULL
};
#endif
/***********************************************************************
** ResponseDevice values
************************************************************************/
static char *responseButtons[] =
{
"~M~ouse",
"~K~eyboard",
"K~o~ala Pad",
NULL
};
#define RB_size (sizeof(responseButtons)/sizeof(char *)-1)
#define RB_L (11+6)
static char *responseTypes[] =
{
"~D~etection",
"D~i~scrimination",
NULL
};
#define RT_size (sizeof(responseTypes)/sizeof(char *)-1)
#define RT_L (18+6)
/***********************************************************************
** Linearity values
************************************************************************/
static char *linearButtons[] =
{
"~L~inear",
"~N~onlinear",
NULL
};
#define lB_size (sizeof(linearButtons)/sizeof(char *)-1)
#define lB_L (9+6)
/***********************************************************************
** Array of fields
************************************************************************/
MenuField expArray[] =
{
{ /* expType */
{
"~E~xperiment Type",
{ EXP_LEFT, EXP_TOP }
},
{
"5",
{ EXP_LEFT2, 1 },
Radiobox,
"%1d",
{ 0.0, (double) eB_size },
expButtons
}
},
{ /* expCode */
{
"",
{ EXP_LEFT, EXP_TOP+eB_size+1 }
},
{
"0",
{ EXP_LEFT2, 1 },
Radiobox,
"%1s",
{ 0.0, (double) RT_size },
responseTypes
}
},
{ /* response_device */
{
"~S~ubject Response Device",
{ EXP_LEFT, EXP_TOP+eB_size+RT_size+3 }
},
{
"0",
{ EXP_LEFT2, 1 },
Radiobox,
"%1s",
{ 0.0, (double) RT_size },
responseButtons
}
},
{ /* numbCorrect */
{
"AFC No. Correct",
{ EXP_RIGHT, EXP_TOP }
},
{
"3",
{ EXP_RIGHT2, 0 },
Integer,
"%1d",
{ 1.0, 3.0 }
}
},
{ /* afcIntervals */
{
"AFC ~I~ntervals",
{ EXP_RIGHT, EXP_TOP+1 }
},
{
"2",
{ EXP_RIGHT2, 0 },
Integer,
"%1d",
{ 2.0, 3.0 }
}
},
{ /* numbReversals */
{
"AFC ~R~eversals",
{ EXP_RIGHT, EXP_TOP+2 }
},
{
"12",
{ EXP_RIGHT2, 0 },
Integer,
"%2d",
{ 1.0, 20.0 }
}
},
{ /* numb_reversals */
{
"Reversals ignored",
{ EXP_RIGHT, EXP_TOP+3 }
},
{
"12",
{ EXP_RIGHT2, 0 },
Integer,
"%2d",
{ 0.0, 20.0 }
}
},
{ /* afcSpeed */
{
"Run Speed [long]",
{ EXP_RIGHT, EXP_TOP+4 }
},
{
"1000",
{ EXP_RIGHT2, 0 },
LongInteger,
"%2ld",
{ 0.0, 1000.0 }
}
},
{ /* afcStep */
{
"Initial Step",
{ EXP_RIGHT, EXP_TOP+5 }
},
{
" 0.0",
{ EXP_RIGHT2, 0 },
Float,
"%4.1f",
{ 0.0, 99.0 }
}
},
{ /* afcHalfStep */
{
"Half Step",
{ EXP_RIGHT, EXP_TOP+6 }
},
{
" 0.0",
{ EXP_RIGHT2, 0 },
Float,
"%4.1f",
{ 0.0, 99.0 }
}
},
{ /* afcFloor */
{
"~F~loor",
{ EXP_RIGHT, EXP_TOP+7 }
},
{
" 0.0",
{ EXP_RIGHT2-2, 0 },
Float,
"%6.1f",
{ MINUS_INFINITY_DB, 9999.0 }
}
},
{ /* afcCeiling */
{
"Ceiling",
{ EXP_RIGHT, EXP_TOP+8 }
},
{
" 0.0",
{ EXP_RIGHT2-2, 0 },
Float,
"%6.1f",
{ MINUS_INFINITY_DB, 9999.0 }
}
},
{ /* valueTrack */
{
NULL,
{ EXP_RIGHT, EXP_TOP+10 }
},
{
"N",
{ EXP_LEFT2, 0 },
Checkbox,
"%1s",
{ 0.0, 1.0 },
intvButtons
}
},
{ /* stimPeek */
{
NULL,
{EXP_RIGHT, EXP_TOP+11 }
},
{
"N",
{ EXP_LEFT2, 0 },
Checkbox,
"%1s",
{ 0.0, 2.0 },
stimButtons
}
},
{ /* noisePeek */
{
NULL,
{EXP_RIGHT, EXP_TOP+12 }
},
{
"N",
{ EXP_LEFT2, 0 },
Checkbox,
"%1s",
{ 0.0, 2.0 },
noiseButtons
}
},
{ /* stimLinearity */
{
"Stimulus",
{ EXP_RIGHT, EXP_TOP+14 }
},
{
"5",
{ EXP_RIGHT3, 1 },
Radiobox,
"%1d",
{ 0.0, (double) lB_size },
linearButtons
}
},
{ /* stepLinearity */
{
"Step",
{EXP_RIGHT+lB_L+2, EXP_TOP+14 }
},
{
"5",
{ EXP_RIGHT3, 1 },
Radiobox,
"%1d",
{ 0.0, (double) lB_size },
linearButtons
}
}
};
MainBox expMenu = /* the whole picture! */
{
{ /* box */
"Experimental Parameters", /* title */
NULL, /* string */
{ 2, 0 }, /* location */
{ 70, 23 }, /* size */
{ 2, 2 } /* labelloc */
},
sizeof(expArray)/sizeof(MenuField), /* number of fields */
expArray /* the array of fields */
};
/************************************************************************
** Equipment configuration list
*************************************************************************/
#include "tv_confg.h" /* SimpleConfiguration class */
BasicConfiguration equipmentList[] =
{
{ &dacDialog, sizeof(DACParameters) },
{ &midDialog, sizeof(MIDParameters) },
{ &expDialog, sizeof(ExpParameters) },
{ &delayData, sizeof(DelayParameters) },
{ 0 } /*terminator*/
};
#endif