/* Copyright 1997 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. */ /***************************************************/ /* File : SaveFile.h */ /* */ /* Purpose: Handle the Save File dialogue (actual */ /* file saving is done in Save.c). Relies */ /* on there being only one Save File */ /* dialogue open at a time (it is a */ /* shared object). */ /* */ /* Author : A.D.Hodgkinson */ /* */ /* History: 03-Sep-97: Created. */ /* */ /* 08-Dec-97: Added code for option or */ /* radio buttons and auto */ /* widthing of the dialogue. */ /***************************************************/ /* Save File dialogue component IDs */ #define SaveFileDrag 0x01200 #define SaveFileWrit 0x01201 #define SaveFileCancel 0x01202 #define SaveFileOK 0x01203 #define SaveFileOption 0x01204 #define SaveFileRadio1 0x01205 #define SaveFileRadio2 0x01206 #define SaveFileCancelMarkNormal 0x01207 #define SaveFileOKMarkNormal 0x01208 #define SaveFileCancelMarkOption 0x01209 #define SaveFileOKMarkOption 0x0120a #define SaveFileCancelMarkRadios 0x0120b #define SaveFileOKMarkRadios 0x0120c #define SaveFileBottomGapMarker 0x0120d #define SaveFileRightGapMarker 0x0120e #define SaveFileAutoWidthMarker 0x0120f /* Save File dialogue event codes */ #define ESaveFileCancel 0x01202 #define ESaveFileOK 0x01203 #define ESaveFileOption 0x01204 #define ESaveFileRadio 0x01205 #define ESaveFileToBeShown 0x013ff #define ESaveFileHidden 0x013fe /* Reason codes for savefile_open_for */ typedef enum savefile_open_reason { save_as_html = 0, save_as_draw, save_as_text } savefile_open_reason; /* Function prototypes */ _kernel_oserror * savefile_set_leafname (ObjectId object, ComponentId component, char * leaf); _kernel_oserror * savefile_set_leafname_from_url (ObjectId object, ComponentId component, char * url); _kernel_oserror * savefile_set_filetype (ObjectId object, ComponentId component, int type, int dont_record); _kernel_oserror * savefile_open_for (browser_data * b, savefile_open_reason reason); int savefile_to_be_shown (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); int savefile_hidden (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle); _kernel_oserror * savefile_close (ObjectId ancestor, int do_not_close); void savefile_return_dialogue_info (ObjectId * window, ObjectId * ancestor); int savefile_alternative_selected (void);