summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2009-08-06 14:17:17 +0000
committercilix42 <cilix42@users.sourceforge.net>2009-08-06 14:17:17 +0000
commit51c2905fd3e99955db2d823b79abb763d8097028 (patch)
tree90128509479f5498e1125d1e4eb9cdc05bf6b6e6 /src/ui
parentAdding one more control to Smart Jelly (diff)
downloadinkscape-51c2905fd3e99955db2d823b79abb763d8097028.tar.gz
inkscape-51c2905fd3e99955db2d823b79abb763d8097028.zip
Revert recent refactoring changes by johnce because they break the build, which cannot be fixed easily.
(bzr r8422)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/clipboard.cpp38
-rw-r--r--src/ui/clipboard.h2
-rw-r--r--src/ui/dialog/aboutbox.cpp2
-rw-r--r--src/ui/dialog/document-metadata.cpp2
-rw-r--r--src/ui/dialog/document-metadata.h2
-rw-r--r--src/ui/dialog/document-properties.cpp4
-rw-r--r--src/ui/dialog/document-properties.h2
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp6
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.h4
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp2
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp8
-rw-r--r--src/ui/dialog/filter-effects-dialog.h2
-rw-r--r--src/ui/dialog/guides.cpp2
-rw-r--r--src/ui/dialog/icon-preview.cpp4
-rw-r--r--src/ui/dialog/layers.cpp4
-rw-r--r--src/ui/dialog/layers.h2
-rw-r--r--src/ui/dialog/livepatheffect-editor.cpp2
-rw-r--r--src/ui/dialog/panel-dialog.h4
-rw-r--r--src/ui/dialog/print.cpp2
-rw-r--r--src/ui/dialog/print.h6
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp30
-rw-r--r--src/ui/dialog/swatches.cpp16
-rw-r--r--src/ui/dialog/swatches.h4
-rw-r--r--src/ui/dialog/undo-history.h2
-rw-r--r--src/ui/view/edit-widget.cpp8
-rw-r--r--src/ui/view/edit-widget.h6
-rw-r--r--src/ui/view/view.cpp2
-rw-r--r--src/ui/view/view.h8
-rw-r--r--src/ui/widget/entity-entry.cpp8
-rw-r--r--src/ui/widget/entity-entry.h8
-rw-r--r--src/ui/widget/imageicon.cpp8
-rw-r--r--src/ui/widget/imageicon.h6
-rw-r--r--src/ui/widget/layer-selector.h2
-rw-r--r--src/ui/widget/licensor.cpp2
-rw-r--r--src/ui/widget/licensor.h4
-rw-r--r--src/ui/widget/object-composite-settings.cpp2
-rw-r--r--src/ui/widget/page-sizer.cpp2
-rw-r--r--src/ui/widget/panel.cpp2
-rw-r--r--src/ui/widget/panel.h4
-rw-r--r--src/ui/widget/registered-enums.h2
-rw-r--r--src/ui/widget/registered-widget.cpp24
-rw-r--r--src/ui/widget/registered-widget.h30
-rw-r--r--src/ui/widget/tolerance-slider.cpp2
43 files changed, 141 insertions, 141 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index e7e8a29dc..7e41006be 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -126,13 +126,13 @@ private:
void _copyTextPath(SPTextPath *);
Inkscape::XML::Node *_copyNode(Inkscape::XML::Node *, Inkscape::XML::Document *, Inkscape::XML::Node *);
- void _pasteDocument(Document *, bool in_place);
- void _pasteDefs(Document *);
+ void _pasteDocument(SPDocument *, bool in_place);
+ void _pasteDefs(SPDocument *);
bool _pasteImage();
bool _pasteText();
SPCSSAttr *_parseColor(const Glib::ustring &);
void _applyPathEffect(SPItem *, gchar const *);
- Document *_retrieveClipboard(Glib::ustring = "");
+ SPDocument *_retrieveClipboard(Glib::ustring = "");
// clipboard callbacks
void _onGet(Gtk::SelectionData &, guint);
@@ -149,7 +149,7 @@ private:
void _userWarn(SPDesktop *, char const *);
// private properites
- Document *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
+ SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node
Inkscape::XML::Node *_root; ///< Reference to the clipboard's root node
Inkscape::XML::Node *_clipnode; ///< The node that holds extra information
@@ -311,7 +311,7 @@ bool ClipboardManagerImpl::paste(bool in_place)
if ( target == CLIPBOARD_TEXT_TARGET ) return _pasteText();
// otherwise, use the import extensions
- Document *tempdoc = _retrieveClipboard(target);
+ SPDocument *tempdoc = _retrieveClipboard(target);
if ( tempdoc == NULL ) {
_userWarn(desktop, _("Nothing on the clipboard."));
return false;
@@ -328,7 +328,7 @@ bool ClipboardManagerImpl::paste(bool in_place)
*/
const gchar *ClipboardManagerImpl::getFirstObjectID()
{
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
return NULL;
}
@@ -373,7 +373,7 @@ bool ClipboardManagerImpl::pasteStyle()
return false;
}
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
// no document, but we can try _text_style
if (_text_style) {
@@ -425,7 +425,7 @@ bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y
}
// FIXME: actually, this should accept arbitrary documents
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
_userWarn(desktop, _("No size on the clipboard."));
return false;
@@ -482,7 +482,7 @@ bool ClipboardManagerImpl::pastePathEffect()
return false;
}
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc ) {
Inkscape::XML::Node *root = sp_document_repr_root(tempdoc);
Inkscape::XML::Node *clipnode = sp_repr_lookup_name(root, "inkscape:clipboard", 1);
@@ -513,7 +513,7 @@ bool ClipboardManagerImpl::pastePathEffect()
*/
Glib::ustring ClipboardManagerImpl::getPathParameter()
{
- Document *tempdoc = _retrieveClipboard(); // any target will do here
+ SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
_userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
return "";
@@ -537,7 +537,7 @@ Glib::ustring ClipboardManagerImpl::getPathParameter()
*/
Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId()
{
- Document *tempdoc = _retrieveClipboard(); // any target will do here
+ SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
_userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
return "";
@@ -769,10 +769,10 @@ Inkscape::XML::Node *ClipboardManagerImpl::_copyNode(Inkscape::XML::Node *node,
* @param in_place Whether to paste the selection where it was when copied
* @pre @c clipdoc is not empty and items can be added to the current layer
*/
-void ClipboardManagerImpl::_pasteDocument(Document *clipdoc, bool in_place)
+void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *target_document = sp_desktop_document(desktop);
+ SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
*target_parent = SP_OBJECT_REPR(desktop->currentLayer());
@@ -839,11 +839,11 @@ void ClipboardManagerImpl::_pasteDocument(Document *clipdoc, bool in_place)
* @param clipdoc The document to paste
* @pre @c clipdoc != NULL and pasting into the active document is possible
*/
-void ClipboardManagerImpl::_pasteDefs(Document *clipdoc)
+void ClipboardManagerImpl::_pasteDefs(SPDocument *clipdoc)
{
// boilerplate vars copied from _pasteDocument
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *target_document = sp_desktop_document(desktop);
+ SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
*defs = sp_repr_lookup_name(root, "svg:defs", 1),
@@ -863,7 +863,7 @@ void ClipboardManagerImpl::_pasteDefs(Document *clipdoc)
*/
bool ClipboardManagerImpl::_pasteImage()
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if ( doc == NULL ) return false;
// retrieve image data
@@ -993,9 +993,9 @@ void ClipboardManagerImpl::_applyPathEffect(SPItem *item, gchar const *effect)
/**
* @brief Retrieve the clipboard contents as a document
- * @return Clipboard contents converted to Document, or NULL if no suitable content was present
+ * @return Clipboard contents converted to SPDocument, or NULL if no suitable content was present
*/
-Document *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target)
+SPDocument *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target)
{
Glib::ustring best_target;
if ( required_target == "" )
@@ -1061,7 +1061,7 @@ Document *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target
if ( in == inlist.end() )
return NULL; // this shouldn't happen unless _getBestTarget returns something bogus
- Document *tempdoc = NULL;
+ SPDocument *tempdoc = NULL;
try {
tempdoc = (*in)->open(filename);
} catch (...) {
diff --git a/src/ui/clipboard.h b/src/ui/clipboard.h
index 467888ed7..54c05ac0d 100644
--- a/src/ui/clipboard.h
+++ b/src/ui/clipboard.h
@@ -31,7 +31,7 @@ namespace UI {
* @brief System-wide clipboard manager
*
* ClipboardManager takes care of manipulating the system clipboard in response
- * to user actions. It holds a complete Document as the contents. This document
+ * to user actions. It holds a complete SPDocument as the contents. This document
* is exported using output extensions when other applications request data.
* Copying to another instance of Inkscape is special-cased, because of the extra
* data required (i.e. style, size, Live Path Effects parameters, etc.)
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index af6a0c516..025bec37a 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -147,7 +147,7 @@ Gtk::Widget *build_splash_widget() {
// should be in UTF-*8..
char *about=g_build_filename(INKSCAPE_SCREENSDIR, _("about.svg"), NULL);
- Document *doc=sp_document_new (about, TRUE);
+ SPDocument *doc=sp_document_new (about, TRUE);
g_free(about);
g_return_val_if_fail(doc != NULL, NULL);
diff --git a/src/ui/dialog/document-metadata.cpp b/src/ui/dialog/document-metadata.cpp
index f69d80fe5..96cad1fbe 100644
--- a/src/ui/dialog/document-metadata.cpp
+++ b/src/ui/dialog/document-metadata.cpp
@@ -207,7 +207,7 @@ DocumentMetadata::update()
}
void
-DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, Document *)
+DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop));
repr->addListener (&_repr_events, this);
diff --git a/src/ui/dialog/document-metadata.h b/src/ui/dialog/document-metadata.h
index 2bc94836b..7f718e9f7 100644
--- a/src/ui/dialog/document-metadata.h
+++ b/src/ui/dialog/document-metadata.h
@@ -49,7 +49,7 @@ protected:
void build_metadata();
void init();
- void _handleDocumentReplaced(SPDesktop* desktop, Document *document);
+ void _handleDocumentReplaced(SPDesktop* desktop, SPDocument *document);
void _handleActivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
void _handleDeactivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 0e928a9eb..423778276 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -851,7 +851,7 @@ DocumentProperties::on_response (int id)
}
void
-DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, Document *document)
+DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, SPDocument *document)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop));
repr->addListener(&_repr_events, this);
@@ -915,7 +915,7 @@ DocumentProperties::onNewGrid()
{
SPDesktop *dt = getDesktop();
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(dt));
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
Glib::ustring typestring = _grids_combo_gridtype.get_active_text();
CanvasGrid::writeNewGridToRepr(repr, doc, CanvasGrid::getGridTypeFromName(typestring.c_str()));
diff --git a/src/ui/dialog/document-properties.h b/src/ui/dialog/document-properties.h
index 5aa8d446d..136ae2c89 100644
--- a/src/ui/dialog/document-properties.h
+++ b/src/ui/dialog/document-properties.h
@@ -70,7 +70,7 @@ protected:
void removeExternalScript();
void scripting_create_popup_menu(Gtk::Widget& parent, sigc::slot<void> rem);
- void _handleDocumentReplaced(SPDesktop* desktop, Document *document);
+ void _handleDocumentReplaced(SPDesktop* desktop, SPDocument *document);
void _handleActivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
void _handleDeactivateDesktop(Inkscape::Application *application, SPDesktop *desktop);
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index 30a7e7c2a..70f2f2ae5 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -120,7 +120,7 @@ findExpanderWidgets(Gtk::Container *parent,
### SVG Preview Widget
#########################################################################*/
-bool SVGPreview::setDocument(Document *doc)
+bool SVGPreview::setDocument(SPDocument *doc)
{
if (document)
sp_document_unref(document);
@@ -151,7 +151,7 @@ bool SVGPreview::setFileName(Glib::ustring &theFileName)
* I don't know why passing false to keepalive is bad. But it
* prevents the display of an svg with a non-ascii filename
*/
- Document *doc = sp_document_new (fileName.c_str(), true);
+ SPDocument *doc = sp_document_new (fileName.c_str(), true);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
@@ -172,7 +172,7 @@ bool SVGPreview::setFromMem(char const *xmlBuffer)
return false;
gint len = (gint)strlen(xmlBuffer);
- Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h
index bd0477b30..90dddce59 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.h
+++ b/src/ui/dialog/filedialogimpl-gtkmm.h
@@ -99,7 +99,7 @@ public:
~SVGPreview();
- bool setDocument(Document *doc);
+ bool setDocument(SPDocument *doc);
bool setFileName(Glib::ustring &fileName);
@@ -128,7 +128,7 @@ private:
/**
* The svg document we are currently showing
*/
- Document *document;
+ SPDocument *document;
/**
* The sp_svg_view widget
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 4a2cc879d..0d8f0de5f 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -887,7 +887,7 @@ bool FileOpenDialogImplWin32::set_svg_preview()
gchar *utf8string = g_utf16_to_utf8((const gunichar2*)_path_string,
_MAX_PATH, NULL, NULL, NULL);
- Document *svgDoc = sp_document_new (utf8string, true);
+ SPDocument *svgDoc = sp_document_new (utf8string, true);
g_free(utf8string);
// Check the document loaded properly
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 026af2c9f..baf46970a 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -1222,7 +1222,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
if(iter) {
SPDesktop *desktop = _dialog.getDesktop();
- Document *doc = sp_desktop_document(desktop);
+ SPDocument *doc = sp_desktop_document(desktop);
SPFilter* filter = (*iter)[_columns.filter];
Inkscape::Selection *sel = sp_desktop_selection(desktop);
@@ -1255,7 +1255,7 @@ void FilterEffectsDialog::FilterModifier::on_selection_toggled(const Glib::ustri
void FilterEffectsDialog::FilterModifier::update_filters()
{
SPDesktop* desktop = _dialog.getDesktop();
- Document* document = sp_desktop_document(desktop);
+ SPDocument* document = sp_desktop_document(desktop);
const GSList* filters = sp_document_get_resource_list(document, "filter");
_model->clear();
@@ -1310,7 +1310,7 @@ void FilterEffectsDialog::FilterModifier::filter_list_button_release(GdkEventBut
void FilterEffectsDialog::FilterModifier::add_filter()
{
- Document* doc = sp_desktop_document(_dialog.getDesktop());
+ SPDocument* doc = sp_desktop_document(_dialog.getDesktop());
SPFilter* filter = new_filter(doc);
const int count = _model->children().size();
@@ -1330,7 +1330,7 @@ void FilterEffectsDialog::FilterModifier::remove_filter()
SPFilter *filter = get_selected_filter();
if(filter) {
- Document* doc = filter->document;
+ SPDocument* doc = filter->document;
sp_repr_unparent(filter->repr);
sp_document_done(doc, SP_VERB_DIALOG_FILTER_EFFECTS, _("Remove filter"));
diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h
index 28c714905..3fb9a46fb 100644
--- a/src/ui/dialog/filter-effects-dialog.h
+++ b/src/ui/dialog/filter-effects-dialog.h
@@ -88,7 +88,7 @@ private:
static void on_activate_desktop(Application*, SPDesktop*, FilterModifier*);
static void on_deactivate_desktop(Application*, SPDesktop*, FilterModifier*);
- void on_document_replaced(SPDesktop*, Document*)
+ void on_document_replaced(SPDesktop*, SPDocument*)
{
update_filters();
}
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp
index 2d7f7cb5b..3a7964ba2 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -119,7 +119,7 @@ void GuidelinePropertiesDialog::_onOK()
void GuidelinePropertiesDialog::_onDelete()
{
- Document *doc = SP_OBJECT_DOCUMENT(_guide);
+ SPDocument *doc = SP_OBJECT_DOCUMENT(_guide);
sp_guide_remove(_guide);
sp_document_done(doc, SP_VERB_NONE,
_("Delete guide"));
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 1490e5b73..336afc3c5 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -36,7 +36,7 @@
extern "C" {
// takes doc, root, icon, and icon name to produce pixels
guchar *
-sp_icon_doc_icon( Document *doc, NRArenaItem *root,
+sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
const gchar *name, unsigned int psize );
}
@@ -247,7 +247,7 @@ void IconPreviewPanel::modeToggled()
void IconPreviewPanel::renderPreview( SPObject* obj )
{
- Document * doc = SP_OBJECT_DOCUMENT(obj);
+ SPDocument * doc = SP_OBJECT_DOCUMENT(obj);
gchar * id = SP_OBJECT_ID(obj);
// g_message(" setting up to render '%s' as the icon", id );
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index 0298042ef..fa47ad88d 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -349,7 +349,7 @@ bool LayersPanel::_checkForSelected(const Gtk::TreePath &path, const Gtk::TreeIt
void LayersPanel::_layersChanged()
{
// g_message("_layersChanged()");
- Document* document = _desktop->doc();
+ SPDocument* document = _desktop->doc();
SPObject* root = document->root;
if ( root ) {
_selectedConnection.block();
@@ -366,7 +366,7 @@ void LayersPanel::_layersChanged()
}
}
-void LayersPanel::_addLayer( Document* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
+void LayersPanel::_addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
{
if ( layer && (level < _maxNestDepth) ) {
unsigned int counter = _mgr->childCount(layer);
diff --git a/src/ui/dialog/layers.h b/src/ui/dialog/layers.h
index c5f945437..16b3be350 100644
--- a/src/ui/dialog/layers.h
+++ b/src/ui/dialog/layers.h
@@ -86,7 +86,7 @@ private:
bool _checkForSelected(const Gtk::TreePath& path, const Gtk::TreeIter& iter, SPObject* layer);
void _layersChanged();
- void _addLayer( Document* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level );
+ void _addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level );
SPObject* _selectedLayer();
diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index bea8a096e..dd2dc8250 100644
--- a/src/ui/dialog/livepatheffect-editor.cpp
+++ b/src/ui/dialog/livepatheffect-editor.cpp
@@ -357,7 +357,7 @@ LivePathEffectEditor::onApply()
if ( sel && !sel->isEmpty() ) {
SPItem *item = sel->singleItem();
if ( item && SP_IS_LPE_ITEM(item) ) {
- Document *doc = current_desktop->doc();
+ SPDocument *doc = current_desktop->doc();
const Util::EnumData<LivePathEffect::EffectType>* data = combo_effecttype.get_active_data();
if (!data) return;
diff --git a/src/ui/dialog/panel-dialog.h b/src/ui/dialog/panel-dialog.h
index 5fc4a9134..7dbb6dd4a 100644
--- a/src/ui/dialog/panel-dialog.h
+++ b/src/ui/dialog/panel-dialog.h
@@ -50,7 +50,7 @@ protected:
static_cast<PanelDialogBase *>(data)->_propagateDesktopActivated(application, desktop);
}
- inline virtual void _propagateDocumentReplaced(SPDesktop* desktop, Document *document);
+ inline virtual void _propagateDocumentReplaced(SPDesktop* desktop, SPDocument *document);
inline virtual void _propagateDesktopActivated(Inkscape::Application *, SPDesktop *);
inline virtual void _propagateDesktopDeactivated(Inkscape::Application *, SPDesktop *);
@@ -106,7 +106,7 @@ private:
void
-PanelDialogBase::_propagateDocumentReplaced(SPDesktop *desktop, Document *document)
+PanelDialogBase::_propagateDocumentReplaced(SPDesktop *desktop, SPDocument *document)
{
_panel.signalDocumentReplaced().emit(desktop, document);
}
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp
index 198495f74..d15773ecb 100644
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
@@ -148,7 +148,7 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
-Print::Print(Document *doc, SPItem *base) :
+Print::Print(SPDocument *doc, SPItem *base) :
_doc (doc),
_base (base)
{
diff --git a/src/ui/dialog/print.h b/src/ui/dialog/print.h
index e8904d744..ea89ebdf2 100644
--- a/src/ui/dialog/print.h
+++ b/src/ui/dialog/print.h
@@ -30,7 +30,7 @@
*/
struct workaround_gtkmm
{
- Document *_doc;
+ SPDocument *_doc;
SPItem *_base;
Inkscape::UI::Widget::RenderingOptions *_tab;
};
@@ -41,14 +41,14 @@ namespace Dialog {
class Print {
public:
- Print(Document *doc, SPItem *base);
+ Print(SPDocument *doc, SPItem *base);
Gtk::PrintOperationResult run(Gtk::PrintOperationAction, Gtk::Window &parent_window);
protected:
private:
GtkPrintOperation *_printop;
- Document *_doc;
+ SPDocument *_doc;
SPItem *_base;
Inkscape::UI::Widget::RenderingOptions _tab;
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 64ea07877..5f86196b1 100644
--- a/src/ui/dialog/svg-fonts-dialog.cpp
+++ b/src/ui/dialog/svg-fonts-dialog.cpp
@@ -161,7 +161,7 @@ void GlyphComboBox::update(SPFont* spfont){
void SvgFontsDialog::on_kerning_value_changed(){
if (!this->kerning_pair) return;
- Document* document = sp_desktop_document(this->getDesktop());
+ SPDocument* document = sp_desktop_document(this->getDesktop());
//TODO: I am unsure whether this is the correct way of calling sp_document_maybe_done
Glib::ustring undokey = "svgfonts:hkern:k:";
@@ -242,7 +242,7 @@ void SvgFontsDialog::update_sensitiveness(){
void SvgFontsDialog::update_fonts()
{
SPDesktop* desktop = this->getDesktop();
- Document* document = sp_desktop_document(desktop);
+ SPDocument* document = sp_desktop_document(desktop);
const GSList* fonts = sp_document_get_resource_list(document, "font");
_model->clear();
@@ -420,7 +420,7 @@ SvgFontsDialog::populate_kerning_pairs_box()
}
}
-SPGlyph *new_glyph(Document* document, SPFont *font, const int count)
+SPGlyph *new_glyph(SPDocument* document, SPFont *font, const int count)
{
g_return_val_if_fail(font != NULL, NULL);
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
@@ -459,7 +459,7 @@ void SvgFontsDialog::update_glyphs(){
void SvgFontsDialog::add_glyph(){
const int count = _GlyphsListStore->children().size();
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
/* SPGlyph* glyph =*/ new_glyph(doc, get_selected_spfont(), count+1);
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Add glyph"));
@@ -475,7 +475,7 @@ void SvgFontsDialog::set_glyph_description_from_selected_path(){
}
Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop);
- Document* doc = sp_desktop_document(desktop);
+ SPDocument* doc = sp_desktop_document(desktop);
Inkscape::Selection* sel = sp_desktop_selection(desktop);
if (sel->isEmpty()){
char *msg = _("Select a <b>path</b> to define the curves of a glyph");
@@ -519,7 +519,7 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){
}
Inkscape::MessageStack *msgStack = sp_desktop_message_stack(desktop);
- Document* doc = sp_desktop_document(desktop);
+ SPDocument* doc = sp_desktop_document(desktop);
Inkscape::Selection* sel = sp_desktop_selection(desktop);
if (sel->isEmpty()){
char *msg = _("Select a <b>path</b> to define the curves of a glyph");
@@ -562,7 +562,7 @@ void SvgFontsDialog::reset_missing_glyph_description(){
return;
}
- Document* doc = sp_desktop_document(desktop);
+ SPDocument* doc = sp_desktop_document(desktop);
SPObject* obj;
for (obj = get_selected_spfont()->children; obj; obj=obj->next){
if (SP_IS_MISSING_GLYPH(obj)){
@@ -581,7 +581,7 @@ void SvgFontsDialog::glyph_name_edit(const Glib::ustring&, const Glib::ustring&
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
glyph->repr->setAttribute("glyph-name", str.c_str());
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Edit glyph name"));
update_glyphs();
@@ -594,7 +594,7 @@ void SvgFontsDialog::glyph_unicode_edit(const Glib::ustring&, const Glib::ustrin
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
glyph->repr->setAttribute("unicode", str.c_str());
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Set glyph unicode"));
update_glyphs();
@@ -604,7 +604,7 @@ void SvgFontsDialog::remove_selected_font(){
SPFont* font = get_selected_spfont();
sp_repr_unparent(font->repr);
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove font"));
update_fonts();
@@ -619,7 +619,7 @@ void SvgFontsDialog::remove_selected_glyph(){
SPGlyph* glyph = (*i)[_GlyphsListColumns.glyph_node];
sp_repr_unparent(glyph->repr);
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove glyph"));
update_glyphs();
@@ -634,7 +634,7 @@ void SvgFontsDialog::remove_selected_kerning_pair(){
SPGlyphKerning* pair = (*i)[_KerningPairsListColumns.spnode];
sp_repr_unparent(pair->repr);
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
sp_document_done(doc, SP_VERB_DIALOG_SVG_FONTS, _("Remove kerning pair"));
update_glyphs();
@@ -705,7 +705,7 @@ void SvgFontsDialog::add_kerning_pair(){
if (this->kerning_pair) return; //We already have this kerning pair
- Document* document = sp_desktop_document(this->getDesktop());
+ SPDocument* document = sp_desktop_document(this->getDesktop());
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document);
// create a new hkern node
@@ -767,7 +767,7 @@ Gtk::VBox* SvgFontsDialog::kerning_tab(){
return &kerning_vbox;
}
-SPFont *new_font(Document *document)
+SPFont *new_font(SPDocument *document)
{
g_return_val_if_fail(document != NULL, NULL);
@@ -820,7 +820,7 @@ void set_font_family(SPFont* font, char* str){
}
void SvgFontsDialog::add_font(){
- Document* doc = sp_desktop_document(this->getDesktop());
+ SPDocument* doc = sp_desktop_document(this->getDesktop());
SPFont* font = new_font(doc);
const int count = _model->children().size();
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index cdd479e9d..e273a827c 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -377,7 +377,7 @@ static void editGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ )
if ( bounceTarget ) {
SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0;
SPDesktop* desktop = swp ? swp->getDesktop() : 0;
- Document *doc = desktop ? desktop->doc() : 0;
+ SPDocument *doc = desktop ? desktop->doc() : 0;
if (doc) {
std::string targetName(bounceTarget->def.descr);
const GSList *gradients = sp_document_get_resource_list(doc, "gradient");
@@ -397,7 +397,7 @@ static void addNewGradient( GtkMenuItem */*menuitem*/, gpointer /*user_data*/ )
if ( bounceTarget ) {
SwatchesPanel* swp = bounceTarget->ptr ? reinterpret_cast<SwatchesPanel*>(bounceTarget->ptr) : 0;
SPDesktop* desktop = swp ? swp->getDesktop() : 0;
- Document *doc = desktop ? desktop->doc() : 0;
+ SPDocument *doc = desktop ? desktop->doc() : 0;
if (doc) {
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
@@ -524,7 +524,7 @@ void ColorItem::_dropDataIn( GtkWidget */*widget*/,
{
}
-static bool bruteForce( Document* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b )
+static bool bruteForce( SPDocument* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b )
{
bool changed = false;
@@ -612,7 +612,7 @@ void ColorItem::_colorDefChanged(void* data)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( desktop ) {
- Document* document = sp_desktop_document( desktop );
+ SPDocument* document = sp_desktop_document( desktop );
Inkscape::XML::Node *rroot = sp_document_repr_root( document );
if ( rroot ) {
@@ -1362,9 +1362,9 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop )
_currentDesktop->connectToolSubselectionChanged(
sigc::hide(sigc::mem_fun(*this, &SwatchesPanel::_updateFromSelection)));
- sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, Document*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument);
- sigc::slot<void, Document*> base2 = first;
- sigc::slot<void,SPDesktop*, Document*> slot2 = sigc::hide<0>( base2 );
+ sigc::bound_mem_functor1<void, Inkscape::UI::Dialogs::SwatchesPanel, SPDocument*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument);
+ sigc::slot<void, SPDocument*> base2 = first;
+ sigc::slot<void,SPDesktop*, SPDocument*> slot2 = sigc::hide<0>( base2 );
_documentConnection = desktop->connectDocumentReplaced( slot2 );
_setDocument( desktop->doc() );
@@ -1374,7 +1374,7 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop )
}
}
-void SwatchesPanel::_setDocument( Document *document )
+void SwatchesPanel::_setDocument( SPDocument *document )
{
if ( document != _currentDocument ) {
if ( _currentDocument ) {
diff --git a/src/ui/dialog/swatches.h b/src/ui/dialog/swatches.h
index 3ad5a38c1..35bcd8c78 100644
--- a/src/ui/dialog/swatches.h
+++ b/src/ui/dialog/swatches.h
@@ -45,7 +45,7 @@ public:
protected:
virtual void _updateFromSelection();
virtual void _handleAction( int setId, int itemId );
- virtual void _setDocument( Document *document );
+ virtual void _setDocument( SPDocument *document );
virtual void _rebuild();
private:
@@ -57,7 +57,7 @@ private:
ColorItem* _remove;
int _currentIndex;
SPDesktop* _currentDesktop;
- Document* _currentDocument;
+ SPDocument* _currentDocument;
void* _ptr;
sigc::connection _documentConnection;
diff --git a/src/ui/dialog/undo-history.h b/src/ui/dialog/undo-history.h
index 0e14b7d7b..82e04f3c9 100644
--- a/src/ui/dialog/undo-history.h
+++ b/src/ui/dialog/undo-history.h
@@ -122,7 +122,7 @@ public:
protected:
- Document *_document;
+ SPDocument *_document;
EventLog *_event_log;
const EventLog::EventModelColumns *_columns;
diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp
index 9619380bb..756f4df73 100644
--- a/src/ui/view/edit-widget.cpp
+++ b/src/ui/view/edit-widget.cpp
@@ -71,7 +71,7 @@ namespace Inkscape {
namespace UI {
namespace View {
-EditWidget::EditWidget (Document *doc)
+EditWidget::EditWidget (SPDocument *doc)
: _main_window_table(4),
_viewport_table(3,3),
_act_grp(Gtk::ActionGroup::create()),
@@ -1191,7 +1191,7 @@ EditWidget::shutdown()
if (Inkscape::NSApplication::Editor::isDuplicatedView (_desktop))
return false;
- Document *doc = _desktop->doc();
+ SPDocument *doc = _desktop->doc();
if (doc->isModifiedSinceSave()) {
gchar *markup;
/// \todo FIXME !!! obviously this will have problems if the document
@@ -1389,7 +1389,7 @@ EditWidget::updateScrollbars (double scale)
_update_s_f = true;
/* The desktop region we always show unconditionally */
- Document *doc = _desktop->doc();
+ SPDocument *doc = _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;
@@ -1548,7 +1548,7 @@ void EditWidget::_namedview_modified (SPObject *obj, guint flags) {
}
void
-EditWidget::initEdit (Document *doc)
+EditWidget::initEdit (SPDocument *doc)
{
_desktop = new SPDesktop();
_desktop->registerEditWidget (this);
diff --git a/src/ui/view/edit-widget.h b/src/ui/view/edit-widget.h
index 28b4b52d2..2bb708305 100644
--- a/src/ui/view/edit-widget.h
+++ b/src/ui/view/edit-widget.h
@@ -36,7 +36,7 @@
#include "ui/widget/zoom-status.h"
struct SPDesktop;
-struct Document;
+struct SPDocument;
struct SPNamedView;
namespace Inkscape {
@@ -46,14 +46,14 @@ namespace View {
class EditWidget : public Gtk::Window,
public EditWidgetInterface {
public:
- EditWidget (Document*);
+ EditWidget (SPDocument*);
~EditWidget();
// Initialization
void initActions();
void initUIManager();
void initLayout();
- void initEdit (Document*);
+ void initEdit (SPDocument*);
void destroyEdit();
// Actions
diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp
index 07bb6d2c1..1b498a846 100644
--- a/src/ui/view/view.cpp
+++ b/src/ui/view/view.cpp
@@ -137,7 +137,7 @@ void View::requestRedraw()
*
* \param doc The new document to connect the view to.
*/
-void View::setDocument(Document *doc) {
+void View::setDocument(SPDocument *doc) {
g_return_if_fail(doc != NULL);
if (_doc) {
diff --git a/src/ui/view/view.h b/src/ui/view/view.h
index 6465807d6..882746cea 100644
--- a/src/ui/view/view.h
+++ b/src/ui/view/view.h
@@ -53,7 +53,7 @@ struct StopOnNonZero {
}
};
-class Document;
+class SPDocument;
namespace Inkscape {
class MessageContext;
@@ -80,7 +80,7 @@ public:
void close() { _close(); }
/// Returns a pointer to the view's document.
- Document *doc() const
+ SPDocument *doc() const
{ return _doc; }
/// Returns a pointer to the view's message stack.
Inkscape::MessageStack *messageStack() const
@@ -108,12 +108,12 @@ public:
virtual void onDocumentResized (double, double) = 0;
protected:
- Document *_doc;
+ SPDocument *_doc;
Inkscape::MessageStack *_message_stack;
Inkscape::MessageContext *_tips_message_context;
virtual void _close();
- virtual void setDocument(Document *doc);
+ virtual void setDocument(SPDocument *doc);
sigc::signal<void,double,double> _position_set_signal;
sigc::signal<void,double,double> _resized_signal;
diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp
index f42b29760..e9f09f574 100644
--- a/src/ui/widget/entity-entry.cpp
+++ b/src/ui/widget/entity-entry.cpp
@@ -81,7 +81,7 @@ EntityLineEntry::~EntityLineEntry()
}
void
-EntityLineEntry::update (Document *doc)
+EntityLineEntry::update (SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
static_cast<Gtk::Entry*>(_packable)->set_text (text ? text : "");
@@ -93,7 +93,7 @@ EntityLineEntry::on_changed()
if (_wr->isUpdating()) return;
_wr->setUpdating (true);
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
Glib::ustring text = static_cast<Gtk::Entry*>(_packable)->get_text();
if (rdf_set_work_entity (doc, _entity, text.c_str()))
sp_document_done (doc, SP_VERB_NONE,
@@ -122,7 +122,7 @@ EntityMultiLineEntry::~EntityMultiLineEntry()
}
void
-EntityMultiLineEntry::update (Document *doc)
+EntityMultiLineEntry::update (SPDocument *doc)
{
const char *text = rdf_get_work_entity (doc, _entity);
Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
@@ -136,7 +136,7 @@ EntityMultiLineEntry::on_changed()
if (_wr->isUpdating()) return;
_wr->setUpdating (true);
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
Gtk::ScrolledWindow *s = static_cast<Gtk::ScrolledWindow*>(_packable);
Gtk::TextView *tv = static_cast<Gtk::TextView*>(s->get_child());
Glib::ustring text = tv->get_buffer()->get_text();
diff --git a/src/ui/widget/entity-entry.h b/src/ui/widget/entity-entry.h
index d080787c1..5bdee9a90 100644
--- a/src/ui/widget/entity-entry.h
+++ b/src/ui/widget/entity-entry.h
@@ -16,7 +16,7 @@
#include <gtkmm/tooltips.h>
struct rdf_work_entity_t;
-class Document;
+class SPDocument;
namespace Gtk {
class TextBuffer;
@@ -32,7 +32,7 @@ class EntityEntry {
public:
static EntityEntry* create (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
virtual ~EntityEntry() = 0;
- virtual void update (Document *doc) = 0;
+ virtual void update (SPDocument *doc) = 0;
virtual void on_changed() = 0;
Gtk::Label _label;
Gtk::Widget *_packable;
@@ -49,7 +49,7 @@ class EntityLineEntry : public EntityEntry {
public:
EntityLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
~EntityLineEntry();
- void update (Document *doc);
+ void update (SPDocument *doc);
protected:
virtual void on_changed();
@@ -59,7 +59,7 @@ class EntityMultiLineEntry : public EntityEntry {
public:
EntityMultiLineEntry (rdf_work_entity_t* ent, Gtk::Tooltips& tt, Registry& wr);
~EntityMultiLineEntry();
- void update (Document *doc);
+ void update (SPDocument *doc);
protected:
virtual void on_changed();
diff --git a/src/ui/widget/imageicon.cpp b/src/ui/widget/imageicon.cpp
index ead32b4b7..6a817e30d 100644
--- a/src/ui/widget/imageicon.cpp
+++ b/src/ui/widget/imageicon.cpp
@@ -94,13 +94,13 @@ void ImageIcon::init()
}
-bool ImageIcon::showSvgDocument(const Document *docArg)
+bool ImageIcon::showSvgDocument(const SPDocument *docArg)
{
if (document)
sp_document_unref(document);
- Document *doc = (Document *)docArg;
+ SPDocument *doc = (SPDocument *)docArg;
sp_document_ref(doc);
document = doc;
@@ -127,7 +127,7 @@ bool ImageIcon::showSvgFile(const Glib::ustring &theFileName)
fileName = Glib::filename_to_utf8(fileName);
- Document *doc = sp_document_new (fileName.c_str(), 0);
+ SPDocument *doc = sp_document_new (fileName.c_str(), 0);
if (!doc) {
g_warning("SVGView: error loading document '%s'\n", fileName.c_str());
return false;
@@ -148,7 +148,7 @@ bool ImageIcon::showSvgFromMemory(const char *xmlBuffer)
return false;
gint len = (gint)strlen(xmlBuffer);
- Document *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
if (!doc) {
g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer);
return false;
diff --git a/src/ui/widget/imageicon.h b/src/ui/widget/imageicon.h
index 3819a3c77..803b2f53f 100644
--- a/src/ui/widget/imageicon.h
+++ b/src/ui/widget/imageicon.h
@@ -16,7 +16,7 @@
#include <gtkmm/box.h>
-class Document;
+class SPDocument;
namespace Inkscape
{
@@ -62,7 +62,7 @@ public:
/**
*
*/
- bool showSvgDocument(const Document *doc);
+ bool showSvgDocument(const SPDocument *doc);
/**
*
@@ -99,7 +99,7 @@ private:
/**
* The svg document we are currently showing
*/
- Document *document;
+ SPDocument *document;
/**
* The sp_svg_view widget
diff --git a/src/ui/widget/layer-selector.h b/src/ui/widget/layer-selector.h
index d9ef558a5..0b5300272 100644
--- a/src/ui/widget/layer-selector.h
+++ b/src/ui/widget/layer-selector.h
@@ -23,7 +23,7 @@
#include "util/list.h"
class SPDesktop;
-class Document;
+class SPDocument;
class SPObject;
namespace Inkscape {
namespace XML {
diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp
index 778fbc6cc..a5f1d89be 100644
--- a/src/ui/widget/licensor.cpp
+++ b/src/ui/widget/licensor.cpp
@@ -119,7 +119,7 @@ Licensor::init (Gtk::Tooltips& tt, Registry& wr)
}
void
-Licensor::update (Document *doc)
+Licensor::update (SPDocument *doc)
{
/* identify the license info */
struct rdf_license_t * license = rdf_get_license (doc);
diff --git a/src/ui/widget/licensor.h b/src/ui/widget/licensor.h
index 6738c48df..9f41a6d0d 100644
--- a/src/ui/widget/licensor.h
+++ b/src/ui/widget/licensor.h
@@ -15,7 +15,7 @@
#include <gtkmm/box.h>
-class Document;
+class SPDocument;
namespace Gtk {
class Tooltips;
@@ -34,7 +34,7 @@ public:
Licensor();
virtual ~Licensor();
void init (Gtk::Tooltips&, Registry&);
- void update (Document *doc);
+ void update (SPDocument *doc);
protected:
EntityEntry *_eentry;
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index 1b4251143..bfc291bc0 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -117,7 +117,7 @@ ObjectCompositeSettings::_blendBlurValueChanged()
if (!desktop) {
return;
}
- Document *document = sp_desktop_document (desktop);
+ SPDocument *document = sp_desktop_document (desktop);
if (_blocked)
return;
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index 429442779..02688a55e 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -346,7 +346,7 @@ PageSizer::setDim (double w, double h, bool changeList)
_changedh_connection.block();
if (SP_ACTIVE_DESKTOP && !_widgetRegistry->isUpdating()) {
- Document *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
+ SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
double const old_height = sp_document_height(doc);
sp_document_set_width (doc, w, &_px_unit);
sp_document_set_height (doc, h, &_px_unit);
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index c2fafa001..93a950d1a 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -566,7 +566,7 @@ Panel::setResponseSensitive(int response_id, bool setting)
_response_map[response_id]->set_sensitive(setting);
}
-sigc::signal<void, SPDesktop *, Document *> &
+sigc::signal<void, SPDesktop *, SPDocument *> &
Panel::signalDocumentReplaced()
{
return _signal_document_replaced;
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index 36f5ea804..d42548f16 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -71,7 +71,7 @@ public:
void setDefaultResponse(int response_id);
void setResponseSensitive(int response_id, bool setting);
- virtual sigc::signal<void, SPDesktop *, Document *> &signalDocumentReplaced();
+ virtual sigc::signal<void, SPDesktop *, SPDocument *> &signalDocumentReplaced();
virtual sigc::signal<void, Inkscape::Application *, SPDesktop *> &signalActivateDesktop();
virtual sigc::signal<void, Inkscape::Application *, SPDesktop *> &signalDeactiveDesktop();
@@ -100,7 +100,7 @@ protected:
/** Signals */
sigc::signal<void, int> _signal_response;
sigc::signal<void> _signal_present;
- sigc::signal<void, SPDesktop *, Document *> _signal_document_replaced;
+ sigc::signal<void, SPDesktop *, SPDocument *> _signal_document_replaced;
sigc::signal<void, Inkscape::Application *, SPDesktop *> _signal_activate_desktop;
sigc::signal<void, Inkscape::Application *, SPDesktop *> _signal_deactive_desktop;
diff --git a/src/ui/widget/registered-enums.h b/src/ui/widget/registered-enums.h
index f9195d1f2..739745817 100644
--- a/src/ui/widget/registered-enums.h
+++ b/src/ui/widget/registered-enums.h
@@ -32,7 +32,7 @@ public:
const Util::EnumDataConverter<E>& c,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL )
+ SPDocument *doc_in = NULL )
: RegisteredWidget< LabelledComboBoxEnum<E> >(label, tip, c)
{
RegisteredWidget< LabelledComboBoxEnum<E> >::init_parent(key, wr, repr_in, doc_in);
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp
index 5780f74ed..95ddec286 100644
--- a/src/ui/widget/registered-widget.cpp
+++ b/src/ui/widget/registered-widget.cpp
@@ -50,7 +50,7 @@ RegisteredCheckButton::~RegisteredCheckButton()
_toggled_connection.disconnect();
}
-RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Gtk::CheckButton>()
{
init_parent(key, wr, repr_in, doc_in);
@@ -108,7 +108,7 @@ RegisteredUnitMenu::~RegisteredUnitMenu()
_changed_connection.disconnect();
}
-RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Labelled> (label, "" /*tooltip*/, new UnitMenu())
{
init_parent(key, wr, repr_in, doc_in);
@@ -149,7 +149,7 @@ RegisteredScalarUnit::~RegisteredScalarUnit()
_value_changed_connection.disconnect();
}
-RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredScalarUnit::RegisteredScalarUnit (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, const RegisteredUnitMenu &rum, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<ScalarUnit>(label, tip, UNIT_TYPE_LINEAR, "", "", rum.getUnitMenu()),
_um(0)
{
@@ -200,7 +200,7 @@ RegisteredScalar::~RegisteredScalar()
RegisteredScalar::RegisteredScalar ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document * doc_in )
+ SPDocument * doc_in )
: RegisteredWidget<Scalar>(label, tip)
{
init_parent(key, wr, repr_in, doc_in);
@@ -248,7 +248,7 @@ RegisteredText::~RegisteredText()
RegisteredText::RegisteredText ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document * doc_in )
+ SPDocument * doc_in )
: RegisteredWidget<Text>(label, tip)
{
init_parent(key, wr, repr_in, doc_in);
@@ -296,7 +296,7 @@ RegisteredColorPicker::RegisteredColorPicker(const Glib::ustring& label,
const Glib::ustring& akey,
Registry& wr,
Inkscape::XML::Node* repr_in,
- Document *doc_in)
+ SPDocument *doc_in)
: RegisteredWidget<ColorPicker> (title, tip, 0, true)
{
init_parent("", wr, repr_in, doc_in);
@@ -337,7 +337,7 @@ RegisteredColorPicker::on_changed (guint32 rgba)
// Use local repr here. When repr is specified, use that one, but
// if repr==NULL, get the repr of namedview of active desktop.
Inkscape::XML::Node *local_repr = repr;
- Document *local_doc = doc;
+ SPDocument *local_doc = doc;
if (!local_repr) {
// no repr specified, use active desktop's namedview's repr
SPDesktop *dt = SP_ACTIVE_DESKTOP;
@@ -372,7 +372,7 @@ RegisteredSuffixedInteger::~RegisteredSuffixedInteger()
_changed_connection.disconnect();
}
-RegisteredSuffixedInteger::RegisteredSuffixedInteger (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+RegisteredSuffixedInteger::RegisteredSuffixedInteger (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& suffix, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Scalar>(label, tip, 0, suffix),
setProgrammatically(false)
{
@@ -419,7 +419,7 @@ RegisteredRadioButtonPair::~RegisteredRadioButtonPair()
RegisteredRadioButtonPair::RegisteredRadioButtonPair (const Glib::ustring& label,
const Glib::ustring& label1, const Glib::ustring& label2,
const Glib::ustring& tip1, const Glib::ustring& tip2,
- const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+ const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
: RegisteredWidget<Gtk::HBox>(),
_rb1(NULL),
_rb2(NULL)
@@ -486,7 +486,7 @@ RegisteredPoint::~RegisteredPoint()
RegisteredPoint::RegisteredPoint ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document* doc_in )
+ SPDocument* doc_in )
: RegisteredWidget<Point> (label, tip)
{
init_parent(key, wr, repr_in, doc_in);
@@ -531,7 +531,7 @@ RegisteredTransformedPoint::~RegisteredTransformedPoint()
RegisteredTransformedPoint::RegisteredTransformedPoint ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document* doc_in )
+ SPDocument* doc_in )
: RegisteredWidget<Point> (label, tip),
to_svg(Geom::identity())
{
@@ -598,7 +598,7 @@ RegisteredRandom::~RegisteredRandom()
RegisteredRandom::RegisteredRandom ( const Glib::ustring& label, const Glib::ustring& tip,
const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in,
- Document * doc_in )
+ SPDocument * doc_in )
: RegisteredWidget<Random> (label, tip)
{
init_parent(key, wr, repr_in, doc_in);
diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h
index 32d6c93fa..a5c61f68a 100644
--- a/src/ui/widget/registered-widget.h
+++ b/src/ui/widget/registered-widget.h
@@ -35,7 +35,7 @@
#include "sp-namedview.h"
class SPUnit;
-class Document;
+class SPDocument;
namespace Gtk {
class HScale;
@@ -81,7 +81,7 @@ protected:
virtual ~RegisteredWidget() {};
- void init_parent(const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *doc_in)
+ void init_parent(const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, SPDocument *doc_in)
{
_wr = &wr;
_key = key;
@@ -96,7 +96,7 @@ protected:
// Use local repr here. When repr is specified, use that one, but
// if repr==NULL, get the repr of namedview of active desktop.
Inkscape::XML::Node *local_repr = repr;
- Document *local_doc = doc;
+ SPDocument *local_doc = doc;
if (!local_repr) {
// no repr specified, use active desktop's namedview's repr
SPDesktop* dt = SP_ACTIVE_DESKTOP;
@@ -120,7 +120,7 @@ protected:
Registry * _wr;
Glib::ustring _key;
Inkscape::XML::Node * repr;
- Document * doc;
+ SPDocument * doc;
unsigned int event_type;
Glib::ustring event_description;
bool write_undo;
@@ -139,7 +139,7 @@ private:
class RegisteredCheckButton : public RegisteredWidget<Gtk::CheckButton> {
public:
virtual ~RegisteredCheckButton();
- RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right=true, Inkscape::XML::Node* repr_in=NULL, Document *doc_in=NULL);
+ RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right=true, Inkscape::XML::Node* repr_in=NULL, SPDocument *doc_in=NULL);
void setActive (bool);
@@ -168,7 +168,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
void setUnit (const SPUnit*);
Unit getUnit() const { return static_cast<UnitMenu*>(_widget)->getUnit(); };
@@ -188,7 +188,7 @@ public:
const RegisteredUnitMenu &rum,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _value_changed_connection;
@@ -204,7 +204,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _value_changed_connection;
@@ -219,7 +219,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _activate_connection;
@@ -237,7 +237,7 @@ public:
const Glib::ustring& akey,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL);
+ SPDocument *doc_in = NULL);
void setRgba32 (guint32);
void closeWindow();
@@ -259,7 +259,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
bool setProgrammatically; // true if the value was set by setValue, not changed by the user;
// if a callback checks it, it must reset it back to false
@@ -280,7 +280,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
void setValue (bool second);
@@ -301,7 +301,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
protected:
sigc::connection _value_x_changed_connection;
@@ -318,7 +318,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL );
+ SPDocument *doc_in = NULL );
// redefine setValue, because transform must be applied
void setValue(Geom::Point const & p);
@@ -342,7 +342,7 @@ public:
const Glib::ustring& key,
Registry& wr,
Inkscape::XML::Node* repr_in = NULL,
- Document *doc_in = NULL);
+ SPDocument *doc_in = NULL);
void setValue (double val, long startseed);
diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp
index bc5b45979..3a36127f4 100644
--- a/src/ui/widget/tolerance-slider.cpp
+++ b/src/ui/widget/tolerance-slider.cpp
@@ -185,7 +185,7 @@ ToleranceSlider::update (double val)
_wr->setUpdating (true);
- Document *doc = sp_desktop_document(dt);
+ SPDocument *doc = sp_desktop_document(dt);
bool saved = sp_document_get_undo_sensitive (doc);
sp_document_set_undo_sensitive (doc, false);
Inkscape::XML::Node *repr = SP_OBJECT_REPR (sp_desktop_namedview(dt));