Documentation from save.h |
Introduction | [top] |
ROV - Easy applications from C
Copyright - © Jason Tribbeck / 7th ARM 1994-2001
Contributing authors - Jason Tribbeck
File - save.h
Type - subsystem
Description
The save subsystem creates and handles RISC OS Style Guide compliant save boxes, including the extensions to handle options on the save box.
_rov_save (function pointer) | [top] |
Definition of a save handler.
Parameters:
- char *name - the file name to save.
Returns:
- non-zero for successful save (and close box).
Note - Called when the filename is entered, or when the file is dropped onto the filer window (or application), and the response is sent back.
typedef int (* _rov_save)(char *name);
_rov_select (function pointer) | [top] |
Definition of a selection handler.
Parameters:
- int index - the index of the option selected.
typedef void (* _rov_select)(int index);
saveas | [top] |
Create a save box as a menu.
Parameters:
- char *name - the current name of the file.
- int type - the current file type.
- int size - the current size.
- _rov_save handler - the save handler.
- int options - the number of options after the list.
- ... - a sequence of strings for the options. Note that the first character is the depth of options, with zero being a check box, and non-zero being a radio icon.Returns:
- the canvas generated.
canvas saveas(char *name, int type, int size, _rov_save handler, int options, ...);See also: saveas_sticky()
saveas_sticky | [top] |
Create a save box as a canvas which does not close if he user clicks outside the box.
Parameters:
- char *name - the current name of the file.
- int type - the current file type.
- int size - the current size.
- _rov_save handler - the save handler.
- int options - the number of options after the list.
- ... - a sequence of strings for the options. Note that the first character is the depth of options, with zero being a check box, and non-zero being a radio icon.Returns:
- the canvas generated.
canvas saveas_sticky(char *name, int type, int size, _rov_save handler, int options, ...);See also: saveas()
saveas_issafe | [top] |
Find out if the saved file is 'safe' (ie. not stored in memory).
Returns:
- non-zero for safe.
int saveas_issafe(void);
saveas_changefiletype | [top] |
Change the file type for the save file.
Parameters:
- int type - the new file type,
void saveas_changefiletype(int type);
saveas_getoptionstate | [top] |
Get the state of an option.
Parameters:
- int index - the option index.
Returns:
- non-zero if the option is selected.
int saveas_getoptionstate(int index);
saveas_setoptionstate | [top] |
Set the state of an option.
Parameters:
- int index - the option index.
- int selected - non-zero to select, zero for unselected.void saveas_setoptionstate(int index, int selected);
saveas_fadeoption | [top] |
Fade/unfade an option.
Parameters:
- int index - the option index.
- int faded - non-zero to fade, zero for unfaded.void saveas_fadeoption(int index, int faded);
saveas_make3d | [top] |
Make the save box 3D.
Note - This has been deprecated, as the 3D status is checked when the saveas box is created.
void saveas_make3d(void);
saveas_changefilename | [top] |
Change the filename.
Parameters:
- char *name - the new filename.
void saveas_changefilename(char *name);
saveas_closedown | [top] |
Close the save box.
Note - This is normally used for saveas_stick().
void saveas_closedown(void);See also: saveas_sticky()
saveas_savetxt (external variable) | [top] |
The text for "Save" to change for internationalisation.
extern char saveas_savetxt[];
saveas_canceltxt (external variable) | [top] |
The text for "Cancel" to change for internationalisation.
extern char saveas_canceltxt[];
saveas_filename (external variable) | [top] |
The pointer to the file name buffer.
extern char saveas_filename[];
saveas_spritename (external variable) | [top] |
The pointer to the sprite name buffer.
extern char saveas_spritename[];
Generated Thu Feb 7 23:22:52 2002