summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorjohnce <johnce@users.sourceforge.net>2009-08-05 05:40:36 +0000
committerjohnce <johnce@users.sourceforge.net>2009-08-05 05:40:36 +0000
commit8b04d0db6c55e36935690d37defb6f9b68945796 (patch)
tree3909eb7f8201b43f6a4dcfcc854eda2fbc72b17e /src/widgets
parentScour extension added to Makefile.am and POTFILE.in (inkscape.pot updated). (diff)
downloadinkscape-8b04d0db6c55e36935690d37defb6f9b68945796.tar.gz
inkscape-8b04d0db6c55e36935690d37defb6f9b68945796.zip
SPDocument->Document
(bzr r8404)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/desktop-widget.cpp4
-rw-r--r--src/widgets/fill-style.cpp2
-rw-r--r--src/widgets/gradient-selector.cpp4
-rw-r--r--src/widgets/gradient-selector.h2
-rw-r--r--src/widgets/gradient-toolbar.cpp4
-rw-r--r--src/widgets/gradient-vector.cpp8
-rw-r--r--src/widgets/gradient-vector.h8
-rw-r--r--src/widgets/icon.cpp6
-rw-r--r--src/widgets/paint-selector.cpp12
-rw-r--r--src/widgets/select-toolbar.cpp2
-rw-r--r--src/widgets/stroke-style.cpp34
-rw-r--r--src/widgets/toolbox.cpp8
12 files changed, 47 insertions, 47 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index a2f88c16d..fc2e82722 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -820,7 +820,7 @@ SPDesktopWidget::shutdown()
g_assert(desktop != NULL);
if (inkscape_is_sole_desktop_for_document(*desktop)) {
- SPDocument *doc = desktop->doc();
+ Document *doc = desktop->doc();
if (doc->isModifiedSinceSave()) {
GtkWidget *dialog;
@@ -1721,7 +1721,7 @@ sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale)
dtw->update = 1;
/* The desktop region we always show unconditionally */
- SPDocument *doc = dtw->desktop->doc();
+ Document *doc = dtw->desktop->doc();
Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)),
Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) );
SPObject* root = doc->root;
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index 5e9d30bcd..683b041b0 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -355,7 +355,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
if (!desktop) {
return;
}
- SPDocument *document = sp_desktop_document (desktop);
+ Document *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index f24a6781b..15b65c239 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -248,7 +248,7 @@ sp_gradient_selector_get_spread (SPGradientSelector *sel)
}
void
-sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector)
+sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector)
{
g_return_if_fail (sel != NULL);
g_return_if_fail (SP_IS_GRADIENT_SELECTOR (sel));
@@ -307,7 +307,7 @@ sp_gradient_selector_edit_vector_clicked (GtkWidget */*w*/, SPGradientSelector *
static void
sp_gradient_selector_add_vector_clicked (GtkWidget */*w*/, SPGradientSelector *sel)
{
- SPDocument *doc = sp_gradient_vector_selector_get_document (
+ Document *doc = sp_gradient_vector_selector_get_document (
SP_GRADIENT_VECTOR_SELECTOR (sel->vectors));
if (!doc)
diff --git a/src/widgets/gradient-selector.h b/src/widgets/gradient-selector.h
index e68dfecfc..63e18554d 100644
--- a/src/widgets/gradient-selector.h
+++ b/src/widgets/gradient-selector.h
@@ -68,7 +68,7 @@ GtkWidget *sp_gradient_selector_new (void);
void sp_gradient_selector_set_mode (SPGradientSelector *sel, guint mode);
void sp_gradient_selector_set_units (SPGradientSelector *sel, guint units);
void sp_gradient_selector_set_spread (SPGradientSelector *sel, guint spread);
-void sp_gradient_selector_set_vector (SPGradientSelector *sel, SPDocument *doc, SPGradient *vector);
+void sp_gradient_selector_set_vector (SPGradientSelector *sel, Document *doc, SPGradient *vector);
void sp_gradient_selector_set_bbox (SPGradientSelector *sel, gdouble x0, gdouble y0, gdouble x1, gdouble y1);
SPGradientUnits sp_gradient_selector_get_units (SPGradientSelector *sel);
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index ddd9fd96a..f64dc7bd8 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -167,7 +167,7 @@ gr_prepare_label (SPObject *obj)
GtkWidget *
gr_vector_list (SPDesktop *desktop, bool selection_empty, SPGradient *gr_selected, bool gr_multi)
{
- SPDocument *document = sp_desktop_document (desktop);
+ Document *document = sp_desktop_document (desktop);
GtkWidget *om = gtk_option_menu_new ();
GtkWidget *m = gtk_menu_new ();
@@ -435,7 +435,7 @@ GtkWidget *
gr_change_widget (SPDesktop *desktop)
{
Inkscape::Selection *selection = sp_desktop_selection (desktop);
- SPDocument *document = sp_desktop_document (desktop);
+ Document *document = sp_desktop_document (desktop);
SPEventContext *ev = sp_desktop_event_context (desktop);
SPGradient *gr_selected = NULL;
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 1f0c07754..c6a7b37f4 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -155,7 +155,7 @@ sp_gradient_vector_selector_destroy (GtkObject *object)
}
GtkWidget *
-sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr)
+sp_gradient_vector_selector_new (Document *doc, SPGradient *gr)
{
GtkWidget *gvs;
@@ -174,7 +174,7 @@ sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gr)
}
void
-sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr)
+sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr)
{
static gboolean suppress = FALSE;
@@ -220,7 +220,7 @@ sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocum
/* The case of setting NULL -> NULL is not very interesting */
}
-SPDocument *
+Document *
sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs)
{
g_return_val_if_fail (gvs != NULL, NULL);
@@ -1037,7 +1037,7 @@ sp_gradient_vector_widget_load_gradient (GtkWidget *widget, SPGradient *gradient
// Once the user edits a gradient, it stops being auto-collectable
if (SP_OBJECT_REPR(gradient)->attribute("inkscape:collect")) {
- SPDocument *document = SP_OBJECT_DOCUMENT (gradient);
+ Document *document = SP_OBJECT_DOCUMENT (gradient);
bool saved = sp_document_get_undo_sensitive(document);
sp_document_set_undo_sensitive (document, false);
SP_OBJECT_REPR(gradient)->setAttribute("inkscape:collect", NULL);
diff --git a/src/widgets/gradient-vector.h b/src/widgets/gradient-vector.h
index ea1f5159f..aa5444755 100644
--- a/src/widgets/gradient-vector.h
+++ b/src/widgets/gradient-vector.h
@@ -31,7 +31,7 @@ struct SPGradientVectorSelector {
guint idlabel : 1;
- SPDocument *doc;
+ Document *doc;
SPGradient *gr;
/* Vector menu */
@@ -50,11 +50,11 @@ struct SPGradientVectorSelectorClass {
GType sp_gradient_vector_selector_get_type(void);
-GtkWidget *sp_gradient_vector_selector_new (SPDocument *doc, SPGradient *gradient);
+GtkWidget *sp_gradient_vector_selector_new (Document *doc, SPGradient *gradient);
-void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr);
+void sp_gradient_vector_selector_set_gradient (SPGradientVectorSelector *gvs, Document *doc, SPGradient *gr);
-SPDocument *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs);
+Document *sp_gradient_vector_selector_get_document (SPGradientVectorSelector *gvs);
SPGradient *sp_gradient_vector_selector_get_gradient (SPGradientVectorSelector *gvs);
/* fixme: rethink this (Lauris) */
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 6be4b49b3..5e47bd8e4 100644
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -908,7 +908,7 @@ GdkPixbuf *sp_icon_image_load_pixmap(gchar const *name, unsigned /*lsize*/, unsi
// takes doc, root, icon, and icon name to produce pixels
extern "C" guchar *
-sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
+sp_icon_doc_icon( Document *doc, NRArenaItem *root,
gchar const *name, unsigned psize )
{
bool const dump = Inkscape::Preferences::get()->getBool("/debug/icons/dumpSvg");
@@ -1038,7 +1038,7 @@ sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
struct svg_doc_cache_t
{
- SPDocument *doc;
+ Document *doc;
NRArenaItem *root;
};
@@ -1081,7 +1081,7 @@ static std::list<gchar*> &icons_svg_paths()
static guchar *load_svg_pixels(gchar const *name,
unsigned /*lsize*/, unsigned psize)
{
- SPDocument *doc = NULL;
+ Document *doc = NULL;
NRArenaItem *root = NULL;
svg_doc_cache_t *info = NULL;
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index a101b9eeb..d203e094f 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -747,7 +747,7 @@ sp_psel_pattern_change(GtkWidget *widget, SPPaintSelector *psel)
* Returns NULL if there are no patterns in the document.
*/
GSList *
-ink_pattern_list_get (SPDocument *source)
+ink_pattern_list_get (Document *source)
{
if (source == NULL)
return NULL;
@@ -768,7 +768,7 @@ ink_pattern_list_get (SPDocument *source)
* Adds menu items for pattern list - derived from marker code, left hb etc in to make addition of previews easier at some point.
*/
static void
-sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, SPDocument */*source*/)
+sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, Document */*source*/)
{
for (; pattern_list != NULL; pattern_list = pattern_list->next) {
@@ -813,7 +813,7 @@ sp_pattern_menu_build (GtkWidget *m, GSList *pattern_list, SPDocument */*source*
*
*/
static void
-sp_pattern_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *source, SPDocument *pattern_doc)
+sp_pattern_list_from_doc (GtkWidget *m, Document *current_doc, Document *source, Document *pattern_doc)
{
(void)current_doc;
(void)pattern_doc;
@@ -838,9 +838,9 @@ sp_pattern_list_from_doc (GtkWidget *m, SPDocument *current_doc, SPDocument *sou
static void
-ink_pattern_menu_populate_menu(GtkWidget *m, SPDocument *doc)
+ink_pattern_menu_populate_menu(GtkWidget *m, Document *doc)
{
- static SPDocument *patterns_doc = NULL;
+ static Document *patterns_doc = NULL;
// find and load patterns.svg
if (patterns_doc == NULL) {
@@ -878,7 +878,7 @@ ink_pattern_menu(GtkWidget *mnu)
/* Create new menu widget */
GtkWidget *m = gtk_menu_new();
gtk_widget_show(m);
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *doc = SP_ACTIVE_DOCUMENT;
if (!doc) {
GtkWidget *i;
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index f168cedeb..6d28f80e5 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -153,7 +153,7 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
- SPDocument *document = sp_desktop_document(desktop);
+ Document *document = sp_desktop_document(desktop);
sp_document_ensure_up_to_date (document);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index f502f87d3..e0002e5c2 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -81,7 +81,7 @@ sigc::connection marker_start_menu_connection;
sigc::connection marker_mid_menu_connection;
sigc::connection marker_end_menu_connection;
-static SPObject *ink_extract_marker_name(gchar const *n, SPDocument *doc);
+static SPObject *ink_extract_marker_name(gchar const *n, Document *doc);
static void ink_markers_menu_update(Gtk::Container* spw, SPMarkerLoc const which);
static Inkscape::UI::Cache::SvgPreview svg_preview_cache;
@@ -307,7 +307,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
g_object_set_data (G_OBJECT (spw), "update", GINT_TO_POINTER (TRUE));
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- SPDocument *document = sp_desktop_document (desktop);
+ Document *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
@@ -550,7 +550,7 @@ sp_stroke_style_widget_transientize_callback(Inkscape::Application */*inkscape*/
*/
static Gtk::Image *
sp_marker_prev_new(unsigned psize, gchar const *mname,
- SPDocument *source, SPDocument *sandbox,
+ Document *source, Document *sandbox,
gchar const *menu_id, NRArena const */*arena*/, unsigned /*visionkey*/, NRArenaItem *root)
{
// Retrieve the marker named 'mname' from the source SVG document
@@ -617,7 +617,7 @@ sp_marker_prev_new(unsigned psize, gchar const *mname,
* Returns NULL if there are no markers in the document.
*/
GSList *
-ink_marker_list_get (SPDocument *source)
+ink_marker_list_get (Document *source)
{
if (source == NULL)
return NULL;
@@ -641,7 +641,7 @@ ink_marker_list_get (SPDocument *source)
* Adds previews of markers in marker_list to the given menu widget
*/
static void
-sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, SPDocument *source, SPDocument *sandbox, gchar const *menu_id)
+sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, Document *source, Document *sandbox, gchar const *menu_id)
{
// Do this here, outside of loop, to speed up preview generation:
NRArena const *arena = NRArena::create();
@@ -695,7 +695,7 @@ sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, SPDocument *source, SPD
*
*/
static void
-sp_marker_list_from_doc (Gtk::Menu *m, SPDocument */*current_doc*/, SPDocument *source, SPDocument */*markers_doc*/, SPDocument *sandbox, gchar const *menu_id)
+sp_marker_list_from_doc (Gtk::Menu *m, Document */*current_doc*/, Document *source, Document */*markers_doc*/, Document *sandbox, gchar const *menu_id)
{
GSList *ml = ink_marker_list_get(source);
GSList *clean_ml = NULL;
@@ -716,7 +716,7 @@ sp_marker_list_from_doc (Gtk::Menu *m, SPDocument */*current_doc*/, SPDocument *
/**
* Returns a new document containing default start, mid, and end markers.
*/
-SPDocument *
+Document *
ink_markers_preview_doc ()
{
gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
@@ -749,9 +749,9 @@ gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=
}
static void
-ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, SPDocument *doc, SPDocument *sandbox)
+ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, Document *doc, Document *sandbox)
{
- static SPDocument *markers_doc = NULL;
+ static Document *markers_doc = NULL;
// add "None"
Gtk::MenuItem *i = new Gtk::MenuItem();
@@ -804,10 +804,10 @@ ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, SPDocument *doc,
* Creates a menu widget to display markers from markers.svg
*/
static Gtk::OptionMenu *
-ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, SPDocument *sandbox)
+ink_marker_menu(Gtk::Widget */*tbl*/, gchar const *menu_id, Document *sandbox)
{
SPDesktop *desktop = inkscape_active_desktop();
- SPDocument *doc = sp_desktop_document(desktop);
+ Document *doc = sp_desktop_document(desktop);
Gtk::OptionMenu *mnu = new Gtk::OptionMenu();
/* Create new menu widget */
@@ -850,7 +850,7 @@ sp_marker_select(Gtk::OptionMenu *mnu, Gtk::Container *spw, SPMarkerLoc const wh
}
SPDesktop *desktop = inkscape_active_desktop();
- SPDocument *document = sp_desktop_document(desktop);
+ Document *document = sp_desktop_document(desktop);
if (!document) {
return;
}
@@ -930,8 +930,8 @@ ink_marker_menu_get_pos(Gtk::Menu *mnu, gchar const *markname)
static void
ink_markers_menu_update(Gtk::Container* /*spw*/, SPMarkerLoc const which) {
SPDesktop *desktop = inkscape_active_desktop();
- SPDocument *document = sp_desktop_document(desktop);
- SPDocument *sandbox = ink_markers_preview_doc ();
+ Document *document = sp_desktop_document(desktop);
+ Document *sandbox = ink_markers_preview_doc ();
Gtk::Menu *m;
int pos;
@@ -1225,7 +1225,7 @@ sp_stroke_style_line_widget_new(void)
// TODO: this code can be shortened by iterating over the possible menus!
// doing this here once, instead of for each preview, to speed things up
- SPDocument *sandbox = ink_markers_preview_doc ();
+ Document *sandbox = ink_markers_preview_doc ();
// TRANSLATORS: Path markers are an SVG feature that allows you to attach arbitrary shapes
// (arrowheads, bullets, faces, whatever) to the start, end, or middle nodes of a path.
@@ -1539,7 +1539,7 @@ sp_stroke_style_scale_line(Gtk::Container *spw)
Gtk::Adjustment *ml = static_cast<Gtk::Adjustment *>(spw->get_data("miterlimit"));
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- SPDocument *document = sp_desktop_document (desktop);
+ Document *document = sp_desktop_document (desktop);
Inkscape::Selection *selection = sp_desktop_selection (desktop);
GSList const *items = selection->itemList();
@@ -1833,7 +1833,7 @@ sp_stroke_style_update_marker_menus(Gtk::Container *spw, GSList const *objects)
* the caller should free the buffer when they no longer need it.
*/
static SPObject*
-ink_extract_marker_name(gchar const *n, SPDocument *doc)
+ink_extract_marker_name(gchar const *n, Document *doc)
{
gchar const *p = n;
while (*p != '\0' && *p != '#') {
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 8bb15ae6f..c13ad9ba6 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -1886,7 +1886,7 @@ void toggle_snap_callback (GtkToggleAction *act, gpointer data) { //data points
SPDesktop *dt = reinterpret_cast<SPDesktop*>(ptr);
SPNamedView *nv = sp_desktop_namedview(dt);
- SPDocument *doc = SP_OBJECT_DOCUMENT(nv);
+ Document *doc = SP_OBJECT_DOCUMENT(nv);
if (dt == NULL || nv == NULL) {
g_warning("No desktop or namedview specified (in toggle_snap_callback)!");
@@ -3327,7 +3327,7 @@ static void
box3d_angle_value_changed(GtkAdjustment *adj, GObject *dataKludge, Proj::Axis axis)
{
SPDesktop *desktop = (SPDesktop *) g_object_get_data( dataKludge, "desktop" );
- SPDocument *document = sp_desktop_document(desktop);
+ Document *document = sp_desktop_document(desktop);
// quit if run by the attr_changed or selection changed listener
if (g_object_get_data( dataKludge, "freeze" )) {
@@ -3407,7 +3407,7 @@ static void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions,
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
EgeAdjustmentAction* eact = 0;
- SPDocument *document = sp_desktop_document (desktop);
+ Document *document = sp_desktop_document (desktop);
Persp3D *persp = document->current_persp3d;
EgeAdjustmentAction* box3d_angle_x = 0;
@@ -6845,7 +6845,7 @@ static void sp_connector_path_set_ignore(void)
static void connector_spacing_changed(GtkAdjustment *adj, GObject* tbl)
{
SPDesktop *desktop = (SPDesktop *) g_object_get_data( tbl, "desktop" );
- SPDocument *doc = sp_desktop_document(desktop);
+ Document *doc = sp_desktop_document(desktop);
if (!sp_document_get_undo_sensitive(doc))
{