4 * Fancy scrolling message in a proginfo box
6 * © 1994-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Steel library.
13 * Steel is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Steel is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Steel. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 #include "xproginfo.h"
35 #define xprogInfo__TITLE 0
36 #define xprogInfo__NAME 7
37 #define xprogInfo__PURPOSE 5
38 #define xprogInfo__AUTHOR 3
39 #define xprogInfo__VERSION 1
40 #define xprogInfo__SCROLLER 9
50 static void xprogInfo__redraw(wimp_redrawstr *r,void *handle)
52 xprogInfo__str *s=handle;
54 dbox_drawEmbeddedTitle(r,s->d);
55 scroller_redraw(s->s,r);
58 static BOOL xprogInfo__raw(dbox d,wimp_eventstr *e,void *handle)
60 xprogInfo__str *s=handle;
65 wimpt_redraw(xprogInfo__redraw,s);
69 scroller_destroy(s->s);
78 void xprogInfo(char *name,
87 xprogInfo__str *s=mem_alloc(sizeof(xprogInfo__str));
90 s->d=dbox_create("progInfo");
96 s->s=scroller_create(s->d,xprogInfo__SCROLLER,scrolltext,initText,delay);
103 if (s->hasTitle=dbox_hasTitle(s->d),!s->hasTitle)
104 dbox_setEmbeddedTitle(s->d,xprogInfo__TITLE,TRUE);
105 dbox_setfield(s->d,xprogInfo__NAME,"%s",name);
106 dbox_setfield(s->d,xprogInfo__PURPOSE,"%s",purpose);
107 dbox_setfield(s->d,xprogInfo__AUTHOR,"%s",author);
118 dbox_rawEventHandler(s->d,xprogInfo__raw,s);
119 dbox_display(s->d,dbox_MENU_OVERPTR);