X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ffile.h;h=97d1bd5f8a3f2abef0ae55c6b52b8f0707affb6a;hb=42382dfb4164b919ffcdf03766da9f8be4e43b42;hp=af053f027bcc7b4183b00d20c4db1f1390f393c3;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/file.h b/src/file.h index af053f027..97d1bd5f8 100644 --- a/src/file.h +++ b/src/file.h @@ -8,18 +8,30 @@ * Lauris Kaplinski * Chema Celorio * - * Copyright (C) 1999-2002 Authors + * Copyright (C) 2006 Johan Engelen * Copyright (C) 2001-2002 Ximian, Inc. + * Copyright (C) 1999-2002 Authors * * Released under GNU GPL, read the file 'COPYING' for more information */ -#include - -#include "forward.h" -#include +#include +#include #include +#include "extension/extension-forward.h" +#include "extension/system.h" + +struct SPDesktop; +struct SPDocument; + +namespace Inkscape { + namespace Extension { + struct Extension; + } +} + + /*###################### ## N E W ######################*/ @@ -28,7 +40,7 @@ * Creates a new Inkscape document and window. * Return value is a pointer to the newly created desktop. */ -SPDesktop* sp_file_new (const gchar *templ); +SPDesktop* sp_file_new (const Glib::ustring &templ); SPDesktop* sp_file_new_default (void); /*###################### @@ -48,15 +60,17 @@ void sp_file_exit (void); * Opens a new file and window from the given URI */ bool sp_file_open( - const gchar *uri, Inkscape::Extension::Extension *key, - bool add_to_recent = true, bool replace_empty = true - ); + const Glib::ustring &uri, + Inkscape::Extension::Extension *key, + bool add_to_recent = true, + bool replace_empty = true + ); /** * Displays a file open dialog. Calls sp_file_open on * an OK. */ -void sp_file_open_dialog (gpointer object, gpointer data); +void sp_file_open_dialog (Gtk::Window &parentWindow, gpointer object, gpointer data); /** * Reverts file to disk-copy on "YES" @@ -67,25 +81,39 @@ void sp_file_revert_dialog (); ## S A V E ######################*/ +/* + * Added to make only the remote savings. + */ + +bool file_save_remote(SPDocument *doc, const Glib::ustring &uri, + Inkscape::Extension::Extension *key, bool saveas, bool official); + /** * */ -bool sp_file_save (gpointer object, gpointer data); +bool sp_file_save (Gtk::Window &parentWindow, gpointer object, gpointer data); /** * Saves the given document. Displays a file select dialog * to choose the new name. */ -bool sp_file_save_as (gpointer object, gpointer data); +bool sp_file_save_as (Gtk::Window &parentWindow, gpointer object, gpointer data); + +/** + * Saves a copy of the given document. Displays a file select dialog + * to choose a name for the copy. + */ +bool sp_file_save_a_copy (Gtk::Window &parentWindow, gpointer object, gpointer data); + /** * Saves the given document. Displays a file select dialog * if needed. */ -gboolean sp_file_save_document (SPDocument *document); +bool sp_file_save_document (Gtk::Window &parentWindow, SPDocument *document); /* Do the saveas dialog with a document as the parameter */ -gboolean sp_file_save_dialog (SPDocument *doc); +bool sp_file_save_dialog (Gtk::Window &parentWindow, SPDocument *doc, Inkscape::Extension::FileSaveMethod save_method); /*###################### @@ -96,34 +124,50 @@ gboolean sp_file_save_dialog (SPDocument *doc); * Displays a file selector dialog, to allow the * user to import data into the current document. */ -void sp_file_import (GtkWidget * widget); +void sp_file_import (Gtk::Window &parentWindow); /** * Imports a resource */ -void file_import(SPDocument *in_doc, gchar const *uri, Inkscape::Extension::Extension *key); +void file_import(SPDocument *in_doc, const Glib::ustring &uri, + Inkscape::Extension::Extension *key); /*###################### ## E X P O R T ######################*/ /** - * Displays a "Save as" dialog for the user, with an + * Displays a FileExportDialog for the user, with an * additional type selection, to allow the user to export * the a document as a given type. */ -void sp_file_export_dialog (void *widget); +bool sp_file_export_dialog (Gtk::Window &parentWindow); + + +/*###################### +## E X P O R T T O O C A L +######################*/ /** - * Export the given document as a Portable Network Graphics (PNG) - * file. Returns FALSE if an error was encountered while writing - * the file, TRUE otherwise. + * Export the current document to OCAL */ -int sp_export_png_file (SPDocument *doc, const gchar *filename, - double x0, double y0, double x1, double y1, - unsigned int width, unsigned int height, - unsigned long bgcolor, - unsigned int (*status) (float, void *), void *data, bool force_overwrite = false, GSList *items_only = NULL); +//void sp_file_export_to_ocal (Gtk::Window &parentWindow ); + + +/** + * Export the current document to OCAL + */ +//bool sp_file_export_to_ocal_dialog (void *widget); + + +/*###################### +## I M P O R T F R O M O C A L +######################*/ + +/** + * Import a document from OCAL + */ +void sp_file_import_from_ocal (Gtk::Window &parentWindow ); /*###################### @@ -137,12 +181,7 @@ would be useful as instance methods /** * */ -void sp_file_print (void); - -/** - * - */ -void sp_file_print_direct (void); +void sp_file_print (Gtk::Window& parentWindow); /** * @@ -159,13 +198,16 @@ void sp_file_print_preview (gpointer object, gpointer data); void sp_file_vacuum (); -namespace Inkscape { -namespace IO { - -void fixupHrefs( SPDocument *doc, const gchar *uri, gboolean spns ); - -} -} +#endif -#endif +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vi: set autoindent shiftwidth=4 tabstop=8 filetype=cpp expandtab softtabstop=4 encoding=utf-8 textwidth=99 :