3 * stripped down version (uses ibicon)
5 * © 1993-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.
30 static ibicon baricon__icon;
31 static baricon_clickproc baricon__proc;
33 static void baricon__events(ibicon i,ibicon_eventType t,void *handle)
37 if (t==ibicon_LEFTCLICK)
38 baricon__proc(ibicon_syshandle(baricon__icon));
41 wimp_i baricon(char *spritename,int spritearea,baricon_clickproc p)
43 baricon__icon=ibicon_create
47 (sprite_area *)spritearea,
51 ibicon_eventHandler(baricon__icon,baricon__events,0);
53 return (ibicon_syshandle(baricon__icon));
56 wimp_i baricon_left(char *spritename,int spritearea,baricon_clickproc p)
58 baricon__icon=ibicon_create
62 (sprite_area *)spritearea,
66 ibicon_eventHandler(baricon__icon,baricon__events,0);
68 return (ibicon_syshandle(baricon__icon));
71 wimp_i baricon_textandsprite
80 baricon__icon=ibicon_create
84 (sprite_area *)spritearea,
88 ibicon_eventHandler(baricon__icon,baricon__events,0);
90 return (ibicon_syshandle(baricon__icon));
93 wimp_i baricon_textandsprite_left
102 baricon__icon=ibicon_create
106 (sprite_area *)spritearea,
110 ibicon_eventHandler(baricon__icon,baricon__events,0);
112 return (ibicon_syshandle(baricon__icon));
115 wimp_i baricon_newsprite(char *newsprite)
117 ibicon_changeSprite(baricon__icon,newsprite);
118 return (ibicon_syshandle(baricon__icon));
121 wimp_i baricon_newtext(char *newtext)
123 ibicon_changeText(baricon__icon,newtext);
124 return (ibicon_syshandle(baricon__icon));