4 * Change AutoDoc program
7 * (C) Copyright 1998 Manuel Lemos.
8 * (C) Copyright 1996-1997 Ian J. Einman.
9 * (C) Copyright 1993-1996 Jaba Development.
10 * (C) Copyright 1993-1996 Jan van den Baard.
11 * All Rights Reserved.
14 * Revision 42.0 2000/05/09 22:10:58 mlemos
15 * Bumped to revision 42.0 before handing BGUI to AROS team
17 * Revision 41.11 2000/05/09 20:23:20 mlemos
18 * Bumped to revision 41.11
20 * Revision 1.2 2000/05/09 19:55:42 mlemos
21 * Merged with the branch Manuel_Lemos_fixes.
23 * Revision 1.1.2.2 1999/05/31 02:52:53 mlemos
24 * Integrated Anton Rolls changes to generate documentation files in
25 * AmigaGuide and HTML formats.
27 * Revision 1.1.2.1 1998/09/19 01:50:22 mlemos
39 extern struct Window
*MainWindow
;
42 * Show an AmigaDOS error via BGUI_Request().
44 STATIC ULONG
DosRequestA( UBYTE
*gadgets
, UBYTE
*body
, IPTR
*args
)
46 static struct bguiRequest req
= { (LONG
)NULL
};
47 UBYTE buffer
[ 256 ], ebuf
[ 80 ];
50 * Copy the body text into the buffer.
52 strcpy( buffer
, body
);
55 * Obtain the textual DOS error.
57 Fault( IoErr(), (LONG
)NULL
, ebuf
, 80 );
60 * Add this to the buffer.
62 strncat( buffer
, "\n\n\"" ISEQ_HIGHLIGHT
, 256 );
63 strncat( buffer
, ebuf
, 256 );
64 strncat( buffer
, ISEQ_TEXT
"\"", 256 );
67 * Setup the requester.
70 req
.br_TextFormat
= buffer
;
71 req
.br_GadgetFormat
= gadgets
;
72 req
.br_Flags
= BREQF_CENTERWINDOW
| BREQF_AUTO_ASPECT
| BREQF_LOCKWINDOW
;
73 req
.br_Underscore
= '_';
78 return BGUI_RequestA( MainWindow
, &req
, args
);
82 * Show a requester via BGUI_Request().
84 ULONG
MyRequestA( UBYTE
*gadgets
, UBYTE
*body
, IPTR
*args
)
86 static struct bguiRequest req
= { (LONG
)NULL
};
89 * Setup the requester.
92 req
.br_TextFormat
= body
;
93 req
.br_GadgetFormat
= gadgets
;
94 req
.br_Flags
= BREQF_CENTERWINDOW
| BREQF_AUTO_ASPECT
| BREQF_LOCKWINDOW
;
95 req
.br_Underscore
= '_';
100 return( BGUI_RequestA( MainWindow
, &req
, args
));
104 * Set attributes on multiple-objects.
106 VOID
MultiSetAttr( struct GadgetInfo
*gi
, Tag tag
, ULONG data
, ... )
109 struct TagItem tags
[ 2 ];
114 tags
[ 0 ].ti_Tag
= tag
;
115 tags
[ 0 ].ti_Data
= data
;
116 tags
[ 1 ].ti_Tag
= TAG_END
;
118 while ( (obj
= va_arg(ap
, Object
*)) ) {
119 DoMethod(obj
, OM_SET
, &tags
[ 0 ], gi
);
126 * Set attributes to an object.
128 ULONG
SetAttr( Object
*obj
, struct GadgetInfo
*gi
, Tag tag1
, ... )
130 AROS_SLOWSTACKTAGS_PRE_AS(tag1
, ULONG
);
131 retval
= DoMethod( obj
, OM_SET
, AROS_SLOWSTACKTAGS_ARG(tag1
), gi
);
132 AROS_SLOWSTACKTAGS_POST