home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.6
/
ffcollection-1-6-1993-02.iso
/
ff_disks
/
571-600
/
ff_583
/
tpledit
/
src.lzh
/
tplcontrol.c
< prev
Wrap
C/C++ Source or Header
|
1991-12-03
|
22KB
|
899 lines
/*
* tplcontrol.c
*
* MACHINE GENERATED
* Nov 24 1991 19:39:24
*/
#include "defs.h"
Prototype void FreeGads(void);
Prototype int InitGads(void);
Prototype void drawborders(void);
Prototype __geta4 long DispFunc(Gadget *, WORD);
Prototype Gadget *Gad_update_but;
Prototype Gadget *Gad_items_down;
Prototype Gadget *Gad_items_up;
Prototype Gadget *Gad_items_add;
Prototype Gadget *Gad_items_del;
Prototype Gadget *Gad_checked_box;
Prototype Gadget *Gad_border_box;
Prototype Gadget *Gad_vertical_box;
Prototype Gadget *Gad_highlabel_box;
Prototype Gadget *Gad_recessed_box;
Prototype Gadget *Gad_readonly_box;
Prototype Gadget *Gad_immediate_box;
Prototype Gadget *Gad_disabled_box;
Prototype Gadget *Gad_relverify_box;
Prototype Gadget *Gad_gadgets_lv;
Prototype List List_gadgets_lv;
Prototype Gadget *Gad_items_lv;
Prototype List List_items_lv;
Prototype Gadget *Gad_flags_mx;
Prototype List List_flags_mx;
Prototype Gadget *Gad_actions_mx;
Prototype List List_actions_mx;
Prototype Gadget *Gad_buf_space_sl;
Prototype Gadget *Gad_maxval_sl;
Prototype Gadget *Gad_defval_sl;
Prototype Gadget *Gad_region_str;
Prototype char *Buf_region_str;
Prototype Gadget *Gad_label_str;
Prototype char *Buf_label_str;
Prototype Gadget *Gad_default_str;
Prototype char *Buf_default_str;
Prototype Gadget *Gad_items_str;
Prototype char *Buf_items_str;
Prototype Gadget *Gad_actions_txt;
Prototype Gadget *Gad_flags_txt;
Prototype Gadget *Gad_special_txt;
Prototype Gadget *Gad_value_txt;
Prototype NewGadget NGAry[29];
Prototype Gadget *EGList;
Prototype Gadget *Egadlist[29];
Prototype Window *EWin;
Prototype struct VisualInfo *VisInfo;
Gadget *Egadlist[29];
NewGadget NGAry[29] = {
{
GLEF_0, GTOP_0, GWID_0, GHEI_0,
"UPDATE", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_update_but, /* UWORD ng_GadgetID */
PLACETEXT_IN, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_1, GTOP_1, GWID_1, GHEI_1,
"down", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_items_down, /* UWORD ng_GadgetID */
PLACETEXT_IN, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_2, GTOP_2, GWID_2, GHEI_2,
"up", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_items_up, /* UWORD ng_GadgetID */
PLACETEXT_IN, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_3, GTOP_3, GWID_3, GHEI_3,
"add", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_items_add, /* UWORD ng_GadgetID */
PLACETEXT_IN, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_4, GTOP_4, GWID_4, GHEI_4,
"del", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_items_del, /* UWORD ng_GadgetID */
PLACETEXT_IN, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_5, GTOP_5, GWID_5, GHEI_5,
"CHECKED", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_checked_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_6, GTOP_6, GWID_6, GHEI_6,
"BORDER", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_border_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_7, GTOP_7, GWID_7, GHEI_7,
"VERTICAL", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_vertical_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_8, GTOP_8, GWID_8, GHEI_8,
"HIGHLABEL", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_highlabel_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_9, GTOP_9, GWID_9, GHEI_9,
"RECESSED", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_recessed_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_10, GTOP_10, GWID_10, GHEI_10,
"READONLY", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_readonly_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_11, GTOP_11, GWID_11, GHEI_11,
"IMMEDIATE", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_immediate_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_12, GTOP_12, GWID_12, GHEI_12,
"DISABLED", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_disabled_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_13, GTOP_13, GWID_13, GHEI_13,
"RELVERIFY", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_relverify_box, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_14, GTOP_14, GWID_14, GHEI_14,
"Gadgets:", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_gadgets_lv, /* UWORD ng_GadgetID */
PLACETEXT_ABOVE | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_15, GTOP_15, GWID_15, GHEI_15,
"List of Items:", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_items_lv, /* UWORD ng_GadgetID */
PLACETEXT_ABOVE | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_16, GTOP_16, GWID_16, GHEI_16,
NULPTR, /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_flags_mx, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_17, GTOP_17, GWID_17, GHEI_17,
NULPTR, /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_actions_mx, /* UWORD ng_GadgetID */
PLACETEXT_RIGHT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_18, GTOP_18, GWID_18, GHEI_18,
"Buf/Space%3ld", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_buf_space_sl, /* UWORD ng_GadgetID */
PLACETEXT_ABOVE, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_19, GTOP_19, GWID_19, GHEI_19,
"MaxVal %5ld", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_maxval_sl, /* UWORD ng_GadgetID */
PLACETEXT_ABOVE, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_20, GTOP_20, GWID_20, GHEI_20,
"DefVal %5ld", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_defval_sl, /* UWORD ng_GadgetID */
PLACETEXT_ABOVE, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_21, GTOP_21, GWID_21, GHEI_21,
"Region Name ", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_region_str, /* UWORD ng_GadgetID */
PLACETEXT_LEFT | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_22, GTOP_22, GWID_22, GHEI_22,
"Label/Format", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_label_str, /* UWORD ng_GadgetID */
PLACETEXT_LEFT | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_23, GTOP_23, GWID_23, GHEI_23,
"Default Str ", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_default_str, /* UWORD ng_GadgetID */
PLACETEXT_LEFT | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_24, GTOP_24, GWID_24, GHEI_24,
NULPTR, /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_items_str, /* UWORD ng_GadgetID */
PLACETEXT_LEFT, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_25, GTOP_25, GWID_25, GHEI_25,
"Actions:", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_actions_txt, /* UWORD ng_GadgetID */
PLACETEXT_IN | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_26, GTOP_26, GWID_26, GHEI_26,
"TextPos", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_flags_txt, /* UWORD ng_GadgetID */
PLACETEXT_IN | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_27, GTOP_27, GWID_27, GHEI_27,
"SpecialFlags:", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_special_txt, /* UWORD ng_GadgetID */
PLACETEXT_IN | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
{
GLEF_28, GTOP_28, GWID_28, GHEI_28,
"Values:", /* UBYTE *ng_GadgetText */
NULPTR, /* struct TextAttr *ng_TextAttr */
GAD_value_txt, /* UWORD ng_GadgetID */
PLACETEXT_IN | NG_HIGHLABEL, /* ULONG ng_Flags */
NULPTR, /* APTR ng_VisualInfo */
NULPTR, /* APTR ng_UserData */
},
};
Gadget *Gad_update_but;
Gadget *Gad_items_down;
Gadget *Gad_items_up;
Gadget *Gad_items_add;
Gadget *Gad_items_del;
Gadget *Gad_checked_box;
Gadget *Gad_border_box;
Gadget *Gad_vertical_box;
Gadget *Gad_highlabel_box;
Gadget *Gad_recessed_box;
Gadget *Gad_readonly_box;
Gadget *Gad_immediate_box;
Gadget *Gad_disabled_box;
Gadget *Gad_relverify_box;
Gadget *Gad_gadgets_lv;
struct Node NodeAry_gadgets_lv[14] = {
{
NodeAry_gadgets_lv + 1,
(struct Node *)&List_gadgets_lv.mlh_Head,
0, 0,
"Invisible"
},
{
NodeAry_gadgets_lv + 2,
NodeAry_gadgets_lv + 0,
0, 0,
"Button"
},
{
NodeAry_gadgets_lv + 3,
NodeAry_gadgets_lv + 1,
0, 0,
"CheckBox"
},
{
NodeAry_gadgets_lv + 4,
NodeAry_gadgets_lv + 2,
0, 0,
"Integer"
},
{
NodeAry_gadgets_lv + 5,
NodeAry_gadgets_lv + 3,
0, 0,
"ListView"
},
{
NodeAry_gadgets_lv + 6,
NodeAry_gadgets_lv + 4,
0, 0,
"MutualExcl"
},
{
NodeAry_gadgets_lv + 7,
NodeAry_gadgets_lv + 5,
0, 0,
"Number"
},
{
NodeAry_gadgets_lv + 8,
NodeAry_gadgets_lv + 6,
0, 0,
"Cycle"
},
{
NodeAry_gadgets_lv + 9,
NodeAry_gadgets_lv + 7,
0, 0,
"Palette"
},
{
NodeAry_gadgets_lv + 10,
NodeAry_gadgets_lv + 8,
0, 0,
"Scroller"
},
{
NodeAry_gadgets_lv + 11,
NodeAry_gadgets_lv + 9,
0, 0,
"BevelBox"
},
{
NodeAry_gadgets_lv + 12,
NodeAry_gadgets_lv + 10,
0, 0,
"Slider"
},
{
NodeAry_gadgets_lv + 13,
NodeAry_gadgets_lv + 11,
0, 0,
"String"
},
{
(struct Node *)&List_gadgets_lv.mlh_Tail,
NodeAry_gadgets_lv + 12,
0, 0,
"Text"
}
};
List List_gadgets_lv = {
&NodeAry_gadgets_lv[0],
NULPTR,
&NodeAry_gadgets_lv[13]
};
Gadget *Gad_items_lv;
List List_items_lv = {
(struct MinNode *)&List_items_lv.mlh_Tail,
NULPTR,
(struct MinNode *)&List_items_lv.mlh_Head
};
Gadget *Gad_flags_mx;
char *StatAry_flags_mx[] = {
"Left",
"Right",
"Above",
"Below",
"In",
NULPTR
};
char **Ary_flags_mx = StatAry_flags_mx;
Gadget *Gad_actions_mx;
char *StatAry_actions_mx[] = {
"NEW",
"COPY",
"MOVE",
"SIZE",
"EXCL",
"DEL",
"TEST",
NULPTR
};
char **Ary_actions_mx = StatAry_actions_mx;
Gadget *Gad_buf_space_sl;
Gadget *Gad_maxval_sl;
Gadget *Gad_defval_sl;
Gadget *Gad_region_str;
char *Buf_region_str;
Gadget *Gad_label_str;
char *Buf_label_str;
Gadget *Gad_default_str;
char *Buf_default_str;
Gadget *Gad_items_str;
char *Buf_items_str;
Gadget *Gad_actions_txt;
Gadget *Gad_flags_txt;
Gadget *Gad_special_txt;
Gadget *Gad_value_txt;
Gadget *EGList;
/* ***** InitGads ***** */
int
InitGads(void)
{
Gadget *gad;
short i;
EGList = NULPTR;
NewGadget *ng;
for (i = 0, ng = NGAry;
i < sizeof(NGAry)/sizeof(NGAry[0]);
++i, ++ng)
{
ng->ng_VisualInfo = VisInfo;
ng->ng_TextAttr = Scr->Font;
}
if ((gad = CreateContext(&EGList)) == NULL)
return(NULL);
Gad_update_but = gad = Egadlist[GAD_update_but] =
CreateGadget( BUTTON_KIND, gad, NG_update_but,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = BUTTON_KIND;
Gad_items_down = gad = Egadlist[GAD_items_down] =
CreateGadget( BUTTON_KIND, gad, NG_items_down,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = BUTTON_KIND;
Gad_items_up = gad = Egadlist[GAD_items_up] =
CreateGadget( BUTTON_KIND, gad, NG_items_up,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = BUTTON_KIND;
Gad_items_add = gad = Egadlist[GAD_items_add] =
CreateGadget( BUTTON_KIND, gad, NG_items_add,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = BUTTON_KIND;
Gad_items_del = gad = Egadlist[GAD_items_del] =
CreateGadget( BUTTON_KIND, gad, NG_items_del,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = BUTTON_KIND;
Gad_checked_box = gad = Egadlist[GAD_checked_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_checked_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_border_box = gad = Egadlist[GAD_border_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_border_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_vertical_box = gad = Egadlist[GAD_vertical_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_vertical_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_highlabel_box = gad = Egadlist[GAD_highlabel_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_highlabel_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_recessed_box = gad = Egadlist[GAD_recessed_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_recessed_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_readonly_box = gad = Egadlist[GAD_readonly_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_readonly_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_immediate_box = gad = Egadlist[GAD_immediate_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_immediate_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_disabled_box = gad = Egadlist[GAD_disabled_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_disabled_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_relverify_box = gad = Egadlist[GAD_relverify_box] =
CreateGadget(CHECKBOX_KIND, gad, NG_relverify_box,
GTCB_Checked, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = CHECKBOX_KIND;
Gad_gadgets_lv = gad = Egadlist[GAD_gadgets_lv] =
CreateGadget(LISTVIEW_KIND, gad, NG_gadgets_lv,
GTLV_Labels, &List_gadgets_lv,
GTLV_Selected, 0,
GTLV_ShowSelected, NULL,
LAYOUTA_Spacing, 4,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = LISTVIEW_KIND;
Gad_flags_mx = gad = Egadlist[GAD_flags_mx] =
CreateGadget( MX_KIND, gad, NG_flags_mx,
GTMX_Spacing, 4,
GTMX_Labels, Ary_flags_mx,
GTMX_Active, 4,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = MX_KIND;
Gad_actions_mx = gad = Egadlist[GAD_actions_mx] =
CreateGadget( MX_KIND, gad, NG_actions_mx,
GTMX_Spacing, 6,
GTMX_Labels, Ary_actions_mx,
GTMX_Active, 6,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = MX_KIND;
Gad_buf_space_sl = gad = Egadlist[GAD_buf_space_sl] =
CreateGadget( SLIDER_KIND, gad, NG_buf_space_sl,
GTSL_Max, 128,
GTSL_Level, 0,
GTSL_MaxLevelLen, 3,
GTSL_LevelFormat, "Buf/Space%3ld",
GTSL_LevelPlace, PLACETEXT_ABOVE,
GTSL_DispFunc, DispFunc,
PGA_Freedom, LORIENT_HORIZ,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = SLIDER_KIND;
Gad_maxval_sl = gad = Egadlist[GAD_maxval_sl] =
CreateGadget( SLIDER_KIND, gad, NG_maxval_sl,
GTSL_Max, 16383,
GTSL_Level, 0,
GTSL_MaxLevelLen, 5,
GTSL_LevelFormat, "MaxVal %5ld",
GTSL_LevelPlace, PLACETEXT_ABOVE,
GTSL_DispFunc, DispFunc,
PGA_Freedom, LORIENT_HORIZ,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = SLIDER_KIND;
Gad_defval_sl = gad = Egadlist[GAD_defval_sl] =
CreateGadget( SLIDER_KIND, gad, NG_defval_sl,
GTSL_Max, 16383,
GTSL_Level, 0,
GTSL_MaxLevelLen, 5,
GTSL_LevelFormat, "DefVal %5ld",
GTSL_LevelPlace, PLACETEXT_ABOVE,
GTSL_DispFunc, DispFunc,
PGA_Freedom, LORIENT_HORIZ,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = SLIDER_KIND;
Gad_region_str = gad = Egadlist[GAD_region_str] =
CreateGadget( STRING_KIND, gad, NG_region_str,
GTST_MaxChars, 128,
TAG_END);
if (gad == NULL)
return(NULL);
Buf_region_str = ((StringInfo *)gad->SpecialInfo)->Buffer;
(long)gad->UserData = STRING_KIND;
Gad_label_str = gad = Egadlist[GAD_label_str] =
CreateGadget( STRING_KIND, gad, NG_label_str,
GTST_MaxChars, 128,
TAG_END);
if (gad == NULL)
return(NULL);
Buf_label_str = ((StringInfo *)gad->SpecialInfo)->Buffer;
(long)gad->UserData = STRING_KIND;
Gad_default_str = gad = Egadlist[GAD_default_str] =
CreateGadget( STRING_KIND, gad, NG_default_str,
GTST_MaxChars, 128,
TAG_END);
if (gad == NULL)
return(NULL);
Buf_default_str = ((StringInfo *)gad->SpecialInfo)->Buffer;
(long)gad->UserData = STRING_KIND;
Gad_items_str = gad = Egadlist[GAD_items_str] =
CreateGadget( STRING_KIND, gad, NG_items_str,
GTST_MaxChars, 128,
TAG_END);
if (gad == NULL)
return(NULL);
Buf_items_str = ((StringInfo *)gad->SpecialInfo)->Buffer;
(long)gad->UserData = STRING_KIND;
Gad_actions_txt = gad = Egadlist[GAD_actions_txt] =
CreateGadget( TEXT_KIND, gad, NG_actions_txt,
GTTX_Border, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = TEXT_KIND;
Gad_flags_txt = gad = Egadlist[GAD_flags_txt] =
CreateGadget( TEXT_KIND, gad, NG_flags_txt,
GTTX_Border, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = TEXT_KIND;
Gad_special_txt = gad = Egadlist[GAD_special_txt] =
CreateGadget( TEXT_KIND, gad, NG_special_txt,
GTTX_Border, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = TEXT_KIND;
Gad_value_txt = gad = Egadlist[GAD_value_txt] =
CreateGadget( TEXT_KIND, gad, NG_value_txt,
GTTX_Border, 0,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = TEXT_KIND;
Gad_items_lv = gad = Egadlist[GAD_items_lv] =
CreateGadget(LISTVIEW_KIND, gad, NG_items_lv,
GTLV_Labels, &List_items_lv,
GTLV_Selected, 0,
GTLV_ShowSelected, Gad_items_str,
LAYOUTA_Spacing, 4,
TAG_END);
if (gad == NULL)
return(NULL);
(long)gad->UserData = LISTVIEW_KIND;
return(EGList);
}
/* CallBack function to Sliders & Scrollers */
__geta4 long
DispFunc(Gadget *gad, WORD Level)
{
return((long)Level);
}
/* ***** Do BevelBorders ***** */
void
drawborders(void)
{
/* *** extra_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_0, BTOP_0, BWID_0, BHEI_0,
GT_VisualInfo, VisInfo,
TAG_END);
/* *** specflag_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_1, BTOP_1, BWID_1, BHEI_1,
GT_VisualInfo, VisInfo,
TAG_END);
/* *** values_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_2, BTOP_2, BWID_2, BHEI_2,
GT_VisualInfo, VisInfo,
TAG_END);
/* *** flags_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_3, BTOP_3, BWID_3, BHEI_3,
GT_VisualInfo, VisInfo,
TAG_END);
/* *** strings_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_4, BTOP_4, BWID_4, BHEI_4,
GT_VisualInfo, VisInfo,
TAG_END);
/* *** items_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_5, BTOP_5, BWID_5, BHEI_5,
GT_VisualInfo, VisInfo,
TAG_END);
/* *** gadgets_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_6, BTOP_6, BWID_6, BHEI_6,
GT_VisualInfo, VisInfo,
TAG_END);
/* *** actions_bbox *** */
DrawBevelBox(EWin->RPort, BLEF_7, BTOP_7, BWID_7, BHEI_7,
GT_VisualInfo, VisInfo,
TAG_END);
}
/* ***** Free the Gadlist and return ***** */
void
FreeGads(void)
{
FreeGadgets(EGList);
EGList = NULL;
}