3 * Some standard Straylight dboxes.
5 * v. 1.00 (9 August 1991)
7 * © 1991-1998 Straylight
10 /*----- Licensing note ----------------------------------------------------*
12 * This file is part of Straylight's Steel library.
14 * Steel is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
19 * Steel is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with Steel. If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 typedef BOOL (*stddbox_writableHandler)(char *result,void *handle);
43 * BOOL warning(char *okMsg,char *warn,...)
46 * Pops up a warning box, with a Cancel button and a default action button
47 * with your own text in it.
50 * char *okMsg == what to put in the default action button.
51 * char *warn == the warning message (printf()-style format string)
54 * TRUE if the user chose the OK button.
57 BOOL warning(char *okMsg,char *warn,...);
60 * void note(char *notemsg,...)
63 * Displays a small note on the screen, so you can tell the user that he
64 * has done something silly, etc. A lot nicer than old werr().
67 * char *notemsg == the note (printf()-style format string)
70 void note(char *notemsg,...);
78 * stddbox_writableHandler proc,
83 * Opens a dialogue box for the user to input a string. Needs
84 * the 'writable' template.
87 * char *title == the title for the dialogue box.
88 * char *default == the default string to put in the writable area.
89 * char *result == a buffer to contain the result string. May be 0.
90 * stddbox_writableHandler proc == proc to call when OK is clicked. May
91 * be 0. Return TRUE if successful (i.e. we may close the dbox).
92 * void *handle == passed to proc.
95 * TRUE if the string has been updated.
103 stddbox_writableHandler proc,
111 * void (*dispose)(void *handle),
116 * xfersend_saveproc saveproc,
117 * xfersend_sendproc sendproc,
118 * xfersend_printproc printproc,
123 * Pops up a save warning box allowing the use the luxury of saving his
124 * data before closing the file. The file is only removed if the data is
128 * BOOL useName == whether to use the given name in the warning message
129 * void (*dispose)(void *handle) == function to dispose the user's data
130 * the others == as for saveas()
136 void (*dispose)(void *handle),
141 xfersend_saveproc saveproc,
142 xfersend_sendproc sendproc,
143 xfersend_printproc printproc,
158 * Presents a standard progInfo window giving information about an
162 * char *name == the name of the program
163 * char *purpose == what it does
164 * char *author == author/copyright string (usually something like
165 * '© 1992-1998 Straylight')
166 * int version == the version number*100 (e.g. 374 for 3.74 etc.)
167 * char *date == the date of compilation (use _TIME_NOW)
170 void progInfo(char *name,char *purpose,char *author,int version,char *date);
176 * Handles a monologue box (like info windows) where no input is required.
177 * You should create the dbox, fill in any fields required. This routine
178 * then handles the rest. It deletes the dbox when it's finished - it's of
179 * no use to the caller anyway - who wants a used dialogue box with no
182 * You can specify a help message tag to be displayed before any messages
183 * embedded in the icons. This is passed through msgs_lookup before
184 * sending to help_addLine. Specify zero for this to send no message.
187 * dbox d == the box to handle
188 * char *help == the help message tag to stick on the top
191 void mbox(dbox d,char *help);