; ; ibicon.sh ; ; Icon bar icon handling ; ; © 1994-1998 Straylight ; ;----- Licensing note ------------------------------------------------------- ; ; This file is part of Straylight's Sapphire library. ; ; Sapphire is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2, or (at your option) ; any later version. ; ; Sapphire is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with Sapphire. If not, write to the Free Software Foundation, ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; ibicon_create ; ibicon_changeSprite ; ibicon_changeText ; ibicon_remove ; ibicon_init [ :LNOT::DEF:ibicon__dfn GBLL ibicon__dfn ; --- ibicon_create --- ; ; On entry: R0 == pointer to sprite name ; R1 == pointer to text buffer (must be writable if you ; intend to change the text) ; R2 == icon bar position indicator (`window handle') ; R3 == icon bar priority/icon handle ; R4 == pointer to event handler ; R5 == value to pass in R10 ; R6 == value to pass in R12 ; ; On exit: R0 == ibicon icon handle ; May return an error ; ; Use: Places an icon on the icon bar. Your handler is called when ; an event occurs on the icon. On entry to the handler, R10 ; and R12 are set up as for above, R0 is the event type, and ; R1 is the ibicon pointer. IMPORT ibicon_create ; --- ibicon_changeSprite --- ; ; On entry: R0 == ibicon pointer ; R1 == pointer to sprite name ; ; On exit: -- ; ; Use: Changes the sprite of the ibicon passed to it. IMPORT ibicon_changeSprite ; --- ibicon_changeText --- ; ; On entry: R0 == ibicon pointer ; R1 == pointer to new text ; ; On exit: -- ; ; Use: Changes the sprite of the ibicon passed to it. IMPORT ibicon_changeText ; --- ibicon_remove --- ; ; On entry: R0 == ibicon icon handle ; ; On exit: -- ; ; Use: Removes the given icon from the icon bar. IMPORT ibicon_remove ; --- ibicon_init --- ; ; On entry: -- ; ; On exit: -- ; ; Use: Initialises the ibicon unit. IMPORT ibicon_init ;----- Event types ---------------------------------------------------------- ^ 0 ibEvent_select # 1 ibEvent_menu # 1 ibEvent_adjust # 1 ibEvent_save # 1 ibEvent_load # 1 ibEvent_help # 1 ] ;----- That's all, folks ---------------------------------------------------- END