diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-07-12 23:18:31 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-07-12 23:18:31 +0000 |
| commit | c739d01f0879c5d0dafbf02aaa1fb26b955b83e1 (patch) | |
| tree | c3a9624b4f09981bb54d3e08f610a122053e14b3 /src/ui/dialog/filedialog.h | |
| parent | move filedialog to its new home (diff) | |
| download | inkscape-c739d01f0879c5d0dafbf02aaa1fb26b955b83e1.tar.gz inkscape-c739d01f0879c5d0dafbf02aaa1fb26b955b83e1.zip | |
clean up redundancies. add a placeholder for Export dialog
(bzr r1399)
Diffstat (limited to 'src/ui/dialog/filedialog.h')
| -rw-r--r-- | src/ui/dialog/filedialog.h | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/src/ui/dialog/filedialog.h b/src/ui/dialog/filedialog.h index 7755aae7d..c84a6a794 100644 --- a/src/ui/dialog/filedialog.h +++ b/src/ui/dialog/filedialog.h @@ -66,7 +66,9 @@ public: * @param fileTypes one of FileDialogTypes * @param title the title of the dialog */ - static FileOpenDialog *create(const char *path, FileDialogType fileTypes, const char *title); + static FileOpenDialog *create(const Glib::ustring &path, + FileDialogType fileTypes, + const Glib::ustring &title); /** @@ -124,7 +126,10 @@ public: * @param title the title of the dialog * @param key a list of file types from which the user can select */ - static FileSaveDialog *create(const char *path, FileDialogType fileTypes, const char *title, const char * default_key); + static FileSaveDialog *create(const Glib::ustring &path, + FileDialogType fileTypes, + const Glib::ustring &title, + const Glib::ustring &default_key); /** @@ -153,6 +158,66 @@ public: }; //FileSaveDialog + + +/** + * This class provides an implementation-independent API for + * file "Export" dialogs. Saving as these types will not affect + * the original file. + */ +class FileExportDialog +{ +public: + + /** + * Constructor. Do not call directly . Use the factory. + * @param path the directory where to start searching + * @param fileTypes one of FileDialogTypes + * @param title the title of the dialog + * @param key a list of file types from which the user can select + */ + FileExportDialog() + {} + + /** + * Factory. + * @param path the directory where to start searching + * @param fileTypes one of FileDialogTypes + * @param title the title of the dialog + * @param key a list of file types from which the user can select + */ + static FileExportDialog *create(const Glib::ustring &path, + FileDialogType fileTypes, + const Glib::ustring &title, + const Glib::ustring &default_key); + + + /** + * Destructor. + * Perform any necessary cleanups. + */ + virtual ~FileExportDialog () {}; + + + /** + * Show an SaveAs file selector. + * @return the selected path if user selected one, else NULL + */ + virtual bool show() =0; + + /** + * Return the 'key' (filetype) of the selection, if any + * @return a pointer to a string if successful (which must + * be later freed with g_free(), else NULL. + */ + virtual Inkscape::Extension::Extension * getSelectionType() = 0; + + virtual gchar * getFilename () =0; + + +}; //FileSaveDialog + + } //namespace Dialog } //namespace UI } //namespace Inkscape |
