/*
 * buttons.h
 *
 * [Generated from buttons, 25 September 1996]
 */

#if !defined(__CC_NORCROFT) || !defined(__arm)
  #error You must use the Norcroft ARM Compiler for Sapphire programs
#endif

#pragma include_only_once
#pragma force_top_level

#ifndef __buttons_h
#define __buttons_h

#ifndef __sapphire_h
  #include "sapphire.h"
#endif

/*----- Overview ----------------------------------------------------------*
 *
 * Functions provided:
 *
 *   buttons_setup
 *
 * Macros provided:
 *
 *   BUTTON
 *   BUTEND
 *   BCANCEL
 *   BOK
 *   BHELP
 *   BGAP
 */

/* --- buttons_setup --- *
 *
 * On entry:	R0 == dialogue box handle
 *		R1 == pointer to buttons block
 *		R2 == buttons base icon
 *		R3 == number of buttons to allow
 *
 * On exit:	R2 == buttons flag mask
 *		R3 == cancel button icon, or -1
 *
 * Use:		Sets up a dialogue box's buttons according to a buttons
 *		block.
 */

extern routine buttons_setup;

/*----- Macros ------------------------------------------------------------*/

/* --- Macro: BUTTON --- *
 *
 * Arguments:	msg == message tag to put in button
 *
 * Use:		Inserts a text button into a buttons definition block.
 */

/* --- Macro: BCANCEL --- *
 *
 * Arguments:	text == optional text string (default is `Cancel')
 *
 * Use:		Inserts a cancel button into a buttons definition block.
 */

/* --- Macro: BOK --- *
 *
 * Arguments:	--
 *
 * Use:		Inserts an OK button into a buttons definition block.
 */

/* --- Macro: BHELP --- *
 *
 * Arguments:	--
 *
 * Use:		Inserts a help button into a buttons definition block.
 */

/* --- Macro: BGAP --- *
 *
 * Arguments:	--
 *
 * Use:		Omits a button in a buttons definition block.
 */

/* --- Macro: BUTEND --- *
 *
 * Arguments:	--
 *
 * Use:		Terminates a buttons definition block.
 */

/*----- Button block formats ----------------------------------------------*/

#define bFlag_cancel ((1<<0))

#define bFlag_ok ((1<<1))

#define bFlag_help ((1<<2))

#define bFlag_text ((1<<3))

#define bFlag_last ((1<<31))

/*----- That's all, folks -------------------------------------------------*/

#endif
