Category : Miscellaneous Language Source Code
Archive   : DLGDS411.ZIP
Filename : READSCPT.H

Output of file : READSCPT.H contained in archive : DLGDS411.ZIP
#define MAXPARAM 6
#define VersionID "SCRIPT1"

//various record types in the script file, used also to identify the type
//of control
enum recType {Dlg, Button, SText, CText, InputL, Labl, Histry, ILong, CheckB,
RadioB, MultiCB, ListB, Memo, ScrollB, Done = -1};

//various type of validators--not useful in C++ yet
enum valType {Picture, Range, Filter, StringLookup, none = -1};

//the base struct. Overridden by objects that read the script file and
//again by objects that write source. Contains data that is common to
//the dialog and all controls. Read operations will be accomplished by
//the constructor, write operations by extensions to the methods.
struct ViewObj {
char *BaseObj, //base object, like TInputLine
*Obj; //actual class name, like TMyInputLine
int X1, Y1, X2, Y2, //the TRect
DefOptns, Optns, //default and actual options
DefEvMsk, EvMsk, //default and actual eventMask
HCtx, //helpCtx value
Grow; //growMode
char *Param[MAXPARAM]; //possible 6 extra parameters
char *HelpCtxSym, // like hcNoContext
*FieldName, //name you entered for dataRec fieldname
*VarName; //name you entered for variable name or 'control'

virtual void writeCode() {};
virtual void writeFields() {};
virtual void writeVars() {};

//the following objects will have their constructors defined to read the
//script file. They also contain fields special to the control type.
struct DialogObj : ViewObj { //the dialog itself
ushort Palette, WinFlags;
char *DlgFuncName, //like makeDialog
*KeyString, //ID string used when storing resource
*Title; //dialog title

struct ButtonObj : ViewObj {
char *CommandName, //like cmOK
*ButtonText; //like O~k~
ushort CommandValue, //value for Command

struct StaticTextObj : ViewObj {
ushort Attrib;
char *Text;

struct ColoredTextObj : StaticTextObj {
ColoredTextObj() : StaticTextObj() {};

// validator objects for TInputLine not used in C++ but which may be
//present in ascii file.
struct ValidatorObj {
ValidatorObj() {};
virtual void writeCode() {};
struct PictureValidatorObj : ValidatorObj {
int AutoFill;
char *PictureString;
struct RangeValidatorObj : ValidatorObj {
long int LowLim, UpLim;
ushort Transfer;
struct StringLookupValidatorObj : ValidatorObj {
char *List;
struct FilterValidatorObj : ValidatorObj {
char *CharSet;
long ActualCharSet[8]; //represents actual character set

struct InputLineObj : ViewObj {
ushort StringLeng; //AMaxLen parameter
char *ValPtrName; //Class name of validator (not used in C++
ValidatorObj* val;

struct InputLongObj : ViewObj {
char *LongLabelText; //Text of label, used for error reporting
ushort LongStrLeng; //AMaxLen parameter
long int LLim, ULim;
ushort ILOptions;

struct LabelObj : ViewObj {
char *LabelText,
*LinkName; //variable name of control to which label is linked

struct HistoryObj : ViewObj {
ushort HistoryID;
char *HistoryLink; //variable name of control to which history is linked

struct ClusterObj : ViewObj { //basis for RadioButtons, CheckBoxes, MultiCheckBoxes
ushort Items;
long int Mask; //enableMask, not used in C++
TStringCollection *LabelColl; //collection of label names
struct RadioButtonObj : ClusterObj {
RadioButtonObj() : ClusterObj() {};
struct CheckBoxObj : ClusterObj {
CheckBoxObj() : ClusterObj() {};
struct MultiCheckBoxObj : ClusterObj { //not useful in C++ yet
ushort MCBFlags;
int SelRange;
char *States;

struct ListBoxObj : ViewObj {
ushort Columns;
char *ScrollBar; //variable name of attached scrollbar
struct MemoObj : ViewObj {
char *TextFieldName;
ushort BufSize;
char *VScroll, *HScroll;
struct ScrollBarObj : ViewObj {
ScrollBarObj() : ViewObj() {};

extern TNSCollection *ScriptColl; //all controls read are stored in this collection
extern ViewObj* Dialog; //the dialog itself is stored here
extern Boolean present[ScrollB + 1]; //tells which Kinds are present
extern TStringCollection *classCollection; //a collection of all the Class names

ViewObj* getKind(recType Kind);
void readScriptFile(char* scriptName);
void checkMemory();

  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : DLGDS411.ZIP
Filename : READSCPT.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: