gpforge
An advanced bitmap font editor
Loading...
Searching...
No Matches
dialog_save.h File Reference

The unsaved changes dialog. More...

Go to the source code of this file.

Enumerations

enum  gpf_save_answer { GPF_SAVE_SAVE = 1 , GPF_SAVE_DISCARD , GPF_SAVE_CANCEL }
 What to do about unsaved changes. More...

Functions

enum gpf_save_answer gpf_dialog_save (const char *title)
 Asks what to do about unsaved changes.

Detailed Description

The unsaved changes dialog.

"Discard them?" was the wrong question: the answer to unsaved work is usually to save it, so the dialog offers that first and keeps cancel as the way out.

Definition in file dialog_save.h.

Enumeration Type Documentation

◆ gpf_save_answer

What to do about unsaved changes.

None of them is zero: the answer is the dialog's return value, and zero is "still running" to gp_dialog_run().

Enumerator
GPF_SAVE_SAVE 

Save the font, then go on.

GPF_SAVE_DISCARD 

Throw the changes away and go on.

GPF_SAVE_CANCEL 

Do not go on.

Definition at line 22 of file dialog_save.h.

Function Documentation

◆ gpf_dialog_save()

enum gpf_save_answer gpf_dialog_save ( const char * title)

Asks what to do about unsaved changes.

Parameters
titleThe dialog title, which says what asked.
Returns
The answer, GPF_SAVE_CANCEL when the dialog could not be shown or was closed without one.

Definition at line 80 of file dialog_save.c.

References GPF_SAVE_CANCEL, GPF_SAVE_DISCARD, and GPF_SAVE_SAVE.