(* Title:    dboxtcol.h
 * Purpose:  Display and entry of true colours
 * 
 *)

#ifndef __dboxtcol_h
#define __dboxtcol_h

type dboxtcol_colour = integer;  (* colour as BBGGRRxx *)

type dboxtcol_colourhandler = ^procedure handler(col : dboxtcol_colour;
                                                 handle : pointer);

const dboxtcol_Transparent = -1;

(* ----------------------------- dboxtcol ----------------------------------
 * Description:   Displays a dialogue box to allow the editing of a true
 *                colour value.
 *
 * Parameters:    dboxtcol_colour *colour -- colour to be edited
 *                BOOL allow_transparent  -- enables selection of a
 *                                           "see-through" colour
 *                char *name -- title to put in dialogue box.
 *                dboxtcol_colourhandler proc -- function to act on the
 *                                               colour change.
 *                void *handle -- this is the handle passed to "proc".
 * Returns:       TRUE if colour edited, user clicks OK.
 * Other Info:    The dialogue box to be used should be the same as that
 *                used by !Paint to edit the palette. If the user clicks
 *                Select on OK then the "proc" is called and the dialogue box
 *                is closed. If the user right-clicks on OK then the "proc"
 *                is called and the dialogue box stays on the screen. This
 *                allows the client of this function to use "proc" to, say,
 *                change a sprites palette to reflect the edited colour value
 *                and then to cause a redraw of the sprite. 
 *
 *)
function dboxtcol(var colour : dboxtcol_colour;
                allow_transparent : boolean;
                name : string;
                proc : dboxtcol_colourhandler;
                handle : pointer) : boolean; extern;

#endif

(* end dboxtcol.h *)
