Category : C Source Code
Archive   : PUBWIW_C.ZIP
Filename : CONTROL.H
Output of file : CONTROL.H contained in archive : PUBWIW_C.ZIP
* Control.h Control Manager Include File *
*----------------------------------------------*/
#define SB_VERTICAL 0
#define SB_HORIZONTAL 1
#ifdef HAS_ENUM
typedef enum ControlType
{
C_RADIO,
C_CHECK,
C_BUTTON,
C_SCROLL,
C_STATTEXT,
C_EDITTEXT,
C_USERDEF
};
#else
#define C_RADIO 0
#define C_CHECK 1
#define C_BUTTON 2
#define C_SCROLL 3
#define C_STATTEXT 4
#define C_EDITTEXT 5
#define C_USERDEF 6
#endif
/*
* Scroll Bar Arrow
*/
typedef struct
{
polyHead pHdr;
point pnts[8];
COUNT base;
} SBArrow;
typedef struct
{
COUNT axis; /* Vertical or Horizontal */
SBArrow *downArrow, /* Arrow Icon Definitions */
*upArrow;
rect thumb, /* Thumb or Elevator */
shaft;
COUNT maxVal, /* Maximum Value for Control*/
minVal, /* Minimum Value for Control*/
currVal; /* Current Value for Control*/
} ScrollBar;
typedef struct
{
rect inner, outer;
COUNT value;
TEXT *title;
} RadioButton;
typedef struct
{
rect box;
COUNT value;
TEXT *title;
} CheckBox;
typedef struct
{
rect box;
COUNT Xdia, Ydia;
COUNT defalt;
TEXT *title;
} Button;
struct CONTROL
{
struct CONTROL *next;
UBYTE type;
WindowPtr owner;
rect bounds;
UBYTE visible,
enabled;
union
{
Button *bt;
CheckBox *cb;
ScrollBar *sb;
RadioButton *rb;
}defn;
COUNT (*handler)();
UBYTE *data;
COUNT (*action)();
};
typedef struct
{
rect bounds;
UBYTE font, /* Font, default is system font */
size, /* Optional Point Size, if supported */
style; /* Bold, Italic, Underline, etc */
COUNT width; /* Width of string (In Pixels) */
TEXT *string; /* Pointer to String Storage */
}StatText, *StatTextPtr;
typedef struct
{
rect bounds;
UBYTE font, /* Font, default is system font */
size, /* Optional Point Size, if supported */
style; /* Bold, Italic, Underline, etc */
COUNT width, /* Width of string (In Pixels) */
length, /* Length of display string (chars) */
maxLen; /* Maximum length of display string */
UBYTE type; /* Type of actual data */
UBYTE *storage, /* Data in display format */
*format, /* Pointer to format string */
*picture, /* Pointer to picture string */
*data; /* Pointer to data storage area */
}EditText, *EditTextPtr;
typedef struct CONTROL Control, *ControlPtr;
extern ControlPtr NewRadio(), NewCheckBox(), NewButton(), NewScrollBar();
extern SBArrow *_downArrow(), *_upArrow();
extern void _drawScroll(), _drawButton(), _drawRadio(), _drawCheck(),
InsertControl(), DrawControl(), DisposControl();
extern BOOL _dragThumb();
extern COUNT ScrollAction(), ControlEvent(), RadioAction();
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/