/* Copyright 1996 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /**************************************************************************** * This source file was written by Acorn Computers Limited. It is part of * * the RISCOS library for writing applications in C for RISC OS. It may be * * used freely in the creation of programs for Archimedes. It should be * * used with Acorn's C Compiler Release 3 or later. * * * ***************************************************************************/ /* * Title: dboxfile.h * Purpose: display of a dialogue box, for file name input. * */ #ifndef __dboxfile_h #define __dboxfile_h /* ------------------------------ dboxfile --------------------------------- * Description: Displays dialogue box with message, input field, and * OK field and allows input of filename. * * Parameters: char *message -- informative message to be displayed * in dialogue box * unsigned filetype -- OS-dependent type of file * char *a -- default filename (initially) and also used * for user-typed filename * int bufsiz -- size of "a" * Returns: void. * Other Info: The template for the dialogue box must be called * "dboxfile_db". Parameters correspond to the template's * icon numbers as follows: * icon #0 -- OK button * icon #1 -- message * icon #2 -- filename * Template should have the following icons: * icon #0 -- a text icon containing text "OK" * with button type "menu icon" * icon #1 -- an indirected text icon (possibly with * a default message) with button type * "never" * icon #2 -- an indirected text icon with button * type "writeable". * See the "dboxfile_db" template used by !Edit for an * example. * Message must be of max length 20 * The char array pointed to by "a" will contain the typed-in * file name of max length bufsize (if longer, truncated) * */ void dboxfile(char *message, unsigned filetype, char *a, int bufsize); #endif /* end of dboxfile.h */