home *** CD-ROM | disk | FTP | other *** search
- #ifndef __Desk_Save2_h
- #define __Desk_Save2_h
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- #include <stddef.h>
-
- #ifndef __Desk_Dialog2_h
- #include "Desk.Dialog2.h"
- #endif
-
- #ifndef __Desk_Export_h
- #include "Desk.Export.h"
- #endif
-
- #ifndef __Desk_Wimp_h
- #include "Desk.Wimp.h"
- #endif
-
-
-
-
- typedef struct {
- Desk_dialog2_block* dialog2;
- Desk_icon_handle dragsprite;
- Desk_icon_handle filenameicon;
- Desk_export_filesaver filesaver;
- Desk_export_ramsaver ramsaver;
- Desk_export_resulthandler resulthandler;
- size_t estimatedsize;
- int filetype;
- void* reference;
- int dragbutton;
- }
- Desk_save2_block;
-
-
- Desk_save2_block* Desk_Save2_Create(
- Desk_dialog2_block* dialog2,
- Desk_icon_handle dragsprite,
- Desk_icon_handle filenameicon,
- Desk_export_filesaver filesaver,
- Desk_export_ramsaver ramsaver,
- Desk_export_resulthandler resulthandler,
- size_t estimatedsize,
- int filetype,
- void* reference
- );
- /*
- This sets up the specified Desk_dialog2_block to be used to implement a
- save box. Save2 installs its own functions into the dialog2 window (so
- you can't use your own open handler for example).
-
- Whenever the specified dialog2 is opened (eg by you calling
- Desk_Dialog2_OpenDialogMenuLeaf, Desk_Dialog2_OpenDialogMenu or
- Desk_Dialog2_OpenDialogStatic), Save2 looks after all drags of the
- dragsprite etc, and calls 'filesaver' or 'ramsaver' whenever a save is
- attempted.
-
- Thus to implement a save box, all you need to do is create a dialog2
- window using Desk_Dialog2_CreateDialogBlock, write functions to
- save/ramtransfer data, and call Desk_Save2_Create with these functions.
- Lastly, simple open the dialog2 window when appropriate, and the rest
- happens automatically.
- */
-
-
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif
-