Code

add breton win32 installer translation
[inkscape.git] / src / file.h
1 #ifndef __SP_FILE_H__
2 #define __SP_FILE_H__
4 /*
5  * File/Print operations
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Chema Celorio <chema@celorio.com>
10  *
11  * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
12  * Copyright (C) 2001-2002 Ximian, Inc.
13  * Copyright (C) 1999-2002 Authors
14  *
15  * Released under GNU GPL, read the file 'COPYING' for more information
16  */
18 #include <gtkmm.h>
19 #include <glib/gslist.h>
20 #include <gtk/gtkwidget.h>
22 #include "extension/extension-forward.h"
24 struct SPDesktop;
25 struct SPDocument;
27 namespace Inkscape {
28     namespace Extension {
29         struct Extension;
30     }
31 }
33 /*######################
34 ## N E W
35 ######################*/
37 /**
38  * Creates a new Inkscape document and window.
39  * Return value is a pointer to the newly created desktop.
40  */
41 SPDesktop* sp_file_new (const Glib::ustring &templ);
42 SPDesktop* sp_file_new_default (void);
44 /*######################
45 ## D E L E T E
46 ######################*/
48 /**
49  * Close the document/view
50  */
51 void sp_file_exit (void);
53 /*######################
54 ## O P E N
55 ######################*/
57 /**
58  * Opens a new file and window from the given URI
59  */
60 bool sp_file_open(
61     const Glib::ustring &uri,
62     Inkscape::Extension::Extension *key,
63     bool add_to_recent = true,
64     bool replace_empty = true
65     );
67 /**
68  * Displays a file open dialog. Calls sp_file_open on
69  * an OK.
70  */
71 void sp_file_open_dialog (Gtk::Window &parentWindow, gpointer object, gpointer data);
73 /**
74  * Reverts file to disk-copy on "YES"
75  */
76 void sp_file_revert_dialog ();
78 /*######################
79 ## S A V E
80 ######################*/
82 /*
83  * Added to make only the remote savings.
84  */
86 bool file_save_remote(SPDocument *doc, const Glib::ustring &uri,
87                  Inkscape::Extension::Extension *key, bool saveas, bool official);
89 /**
90  *
91  */
92 bool sp_file_save (Gtk::Window &parentWindow, gpointer object, gpointer data);
94 /**
95  *  Saves the given document.  Displays a file select dialog
96  *  to choose the new name.
97  */
98 bool sp_file_save_as (Gtk::Window &parentWindow, gpointer object, gpointer data);
100 /**
101  *  Saves a copy of the given document.  Displays a file select dialog
102  *  to choose a name for the copy.
103  */
104 bool sp_file_save_a_copy (Gtk::Window &parentWindow, gpointer object, gpointer data);
107 /**
108  *  Saves the given document.  Displays a file select dialog
109  *  if needed.
110  */
111 bool sp_file_save_document (Gtk::Window &parentWindow, SPDocument *document);
113 /* Do the saveas dialog with a document as the parameter */
114 bool sp_file_save_dialog (Gtk::Window &parentWindow, SPDocument *doc, bool bAsCopy = FALSE);
117 /*######################
118 ## I M P O R T
119 ######################*/
121 /**
122  * Displays a file selector dialog, to allow the
123  * user to import data into the current document.
124  */
125 void sp_file_import (Gtk::Window &parentWindow);
127 /**
128  * Imports a resource
129  */
130 void file_import(SPDocument *in_doc, const Glib::ustring &uri,
131                  Inkscape::Extension::Extension *key);
133 /*######################
134 ## E X P O R T
135 ######################*/
137 /**
138  * Displays a FileExportDialog for the user, with an
139  * additional type selection, to allow the user to export
140  * the a document as a given type.
141  */
142 bool sp_file_export_dialog (void *widget);
145 /*######################
146 ## E X P O R T  T O  O C A L
147 ######################*/
149 /**
150  * Export the current document to OCAL
151  */
152 void sp_file_export_to_ocal (Gtk::Window &parentWindow );
155 /**
156  * Export the current document to OCAL
157  */
158 bool sp_file_export_to_ocal_dialog (void *widget);
161 /*######################
162 ## I M P O R T  F R O M  O C A L
163 ######################*/
165 /**
166  * Import a document from OCAL
167  */
168 void sp_file_import_from_ocal (Gtk::Window &parentWindow );
171 /*######################
172 ## P R I N T
173 ######################*/
175 /* These functions are redundant now, but
176 would be useful as instance methods
177 */
179 /**
180  *
181  */
182 void sp_file_print (Gtk::Window& parentWindow);
184 /**
185  *
186  */
187 void sp_file_print_preview (gpointer object, gpointer data);
189 /*#####################
190 ## U T I L I T Y
191 #####################*/
193 /**
194  * clean unused defs out of file
195  */
196 void sp_file_vacuum ();
199 namespace Inkscape {
200 namespace IO {
202 void fixupHrefs( SPDocument *doc, const gchar *uri, gboolean spns );
208 #endif