4 ; Draggable file icons as dbx controls
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire 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 ; Sapphire 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 Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
45 [ :LNOT::DEF:fileIcon__dfn
48 ; --- fileIcon_sprName ---
50 ; On entry: R0 == filetype
51 ; R1 == pointer to filename
53 ; On exit: R0 == pointer to sprite name to use
55 ; Use: Works out the sprite name to use for the given filetype and
58 IMPORT fileIcon_sprName
60 ; --- fileIcon_reAppear ---
66 ; Use: Makes the currently vanished file icon reappear.
68 IMPORT fileIcon_reAppear
70 ; --- fileIcon_closed ---
72 ; On entry: R0 == dialogue box handle
76 ; Use: Informs fileIcon that the specified dialogue box has closed.
78 IMPORT fileIcon_closed
84 ; Workspace: +0 == filetype of object to display
85 ; +4 == address of filename
90 ; Use: Control which displays a filetype icon, and allows it to
95 ;----- Macros and symbols ---------------------------------------------------
98 $label FILEICN $icon,$baseReg,$data
100 $label CONTROL $icon,fileIcon,$baseReg,0,$data
105 fIcon_event EQU &80000003 ;File icon dropped
107 ;R2 == dest window handle
108 ;R3 == dest icon handle
112 ;----- That's all, folks ----------------------------------------------------