/* * nopoll * Provides handling for a dbox without polling (for error boxes and so * on * * v. 1.00 (30 July 1991) * * © 1991-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel 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. * * Steel 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 Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __nopoll_h #define __nopoll_h #ifndef __dbox_h #include "dbox.h" #endif /*--------------------------------------------------------------------------- Support is provided for three action buttons, here referred to as 'OK', 'Cancel' and 'Other'. Fair enough? Good. 'OK' is the default action button, which may also be selected by pressing return. Pressing escape is equivalent to clicking Cancel. The 'Other' button (good, eh?) has no keyboard equivalent. To indicate that you don't want a particular button to exist, just pass -1 as the number. ---------------------------------------------------------------------------*/ #define nopoll_OK 1 #define nopoll_CANCEL 2 #define nopoll_OTHER 3 #define nopoll_NOBUTTON -1 /* * Flags for how you want the box to appear */ typedef enum { nopoll_ASIS, nopoll_CENTRE, nopoll_ONPTR } nopoll_appearFlags; /* * void nopoll_showDbox(dbox d,nopoll_appearFlags flags) * * Use * Displays a dbox on-screen without polling the WIMP. Useful * for copyright windows and things. * * Parameters * dbox d == the dbox handle * nopoll_appearFlags flags == how you want the dbox to appear */ void nopoll_showDbox(dbox d,nopoll_appearFlags flags); /* * int nopoll_doDbox * ( * dbox d, * nopoll_appearFlags flags, * dbox_field OK, * dbox_field cancel, * dbox_field other * ) * * Use * Opens a NoPoll dialogue box, continues until it gets a sensible result, * closes it, and then returns the result. * * Parameters * dbox d == the dialogue box you want to use for this. * nopoll_appearFlags flags == how you want the box to appear (see above) * dbox_field OK == the number of the OK button * dbox_field cancel == the number of the Cancel button * dbox_field other == the number of the Other button * * Returns * One of the macros defined above, depending on what the user did. */ int nopoll_doDbox ( dbox d, nopoll_appearFlags flags, dbox_field OK, dbox_field cancel, dbox_field other ); #endif