summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorjohnce <johnce@users.sourceforge.net>2009-08-05 06:38:07 +0000
committerjohnce <johnce@users.sourceforge.net>2009-08-05 06:38:07 +0000
commit4cd79453c07adefb912a4dbd0afb2e7c2722bd90 (patch)
tree66389573099d623138a62cb88f082ccbadc0c11e /src/ui
parentSPDocument->Document (diff)
downloadinkscape-4cd79453c07adefb912a4dbd0afb2e7c2722bd90.tar.gz
inkscape-4cd79453c07adefb912a4dbd0afb2e7c2722bd90.zip
SPDocument->Document
(bzr r8408)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/aboutbox.cpp2
-rw-r--r--src/ui/dialog/document-metadata.cpp2
-rw-r--r--src/ui/dialog/document-properties.cpp4
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp6
-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/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/livepatheffect-editor.cpp2
-rw-r--r--src/ui/dialog/print.cpp2
-rw-r--r--src/ui/dialog/svg-fonts-dialog.cpp30
-rw-r--r--src/ui/dialog/swatches.cpp16
-rw-r--r--src/ui/view/edit-widget.cpp8
-rw-r--r--src/ui/view/view.cpp2
-rw-r--r--src/ui/widget/entity-entry.cpp8
-rw-r--r--src/ui/widget/imageicon.cpp8
-rw-r--r--src/ui/widget/licensor.cpp2
-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/registered-widget.cpp24
-rw-r--r--src/ui/widget/tolerance-slider.cpp2
23 files changed, 72 insertions, 72 deletions
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index 025bec37a..af6a0c516 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);
- SPDocument *doc=sp_document_new (about, TRUE);
+ Document *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 96cad1fbe..f69d80fe5 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, SPDocument *)
+DocumentMetadata::_handleDocumentReplaced(SPDesktop* desktop, Document *)
{
Inkscape::XML::Node *repr = SP_OBJECT_REPR(sp_desktop_namedview(desktop));
repr->addListener (&_repr_events, this);
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 423778276..0e928a9eb 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, SPDocument *document)
+DocumentProperties::_handleDocumentReplaced(SPDesktop* desktop, Document *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));
- SPDocument *doc = sp_desktop_document(dt);
+ Document *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/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index 70f2f2ae5..30a7e7c2a 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(SPDocument *doc)
+bool SVGPreview::setDocument(Document *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
*/
- SPDocument *doc = sp_document_new (fileName.c_str(), true);
+ Document *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);
- SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ Document *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-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 0d8f0de5f..4a2cc879d 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);
- SPDocument *svgDoc = sp_document_new (utf8string, true);
+ Document *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 baf46970a..026af2c9f 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();
- SPDocument *doc = sp_desktop_document(desktop);
+ Document *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();
- SPDocument* document = sp_desktop_document(desktop);
+ Document* 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()
{
- SPDocument* doc = sp_desktop_document(_dialog.getDesktop());
+ Document* 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) {
- SPDocument* doc = filter->document;
+ Document* 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/guides.cpp b/src/ui/dialog/guides.cpp
index 3a7964ba2..2d7f7cb5b 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -119,7 +119,7 @@ void GuidelinePropertiesDialog::_onOK()
void GuidelinePropertiesDialog::_onDelete()
{
- SPDocument *doc = SP_OBJECT_DOCUMENT(_guide);
+ Document *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 336afc3c5..1490e5b73 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( SPDocument *doc, NRArenaItem *root,
+sp_icon_doc_icon( Document *doc, NRArenaItem *root,
const gchar *name, unsigned int psize );
}
@@ -247,7 +247,7 @@ void IconPreviewPanel::modeToggled()
void IconPreviewPanel::renderPreview( SPObject* obj )
{
- SPDocument * doc = SP_OBJECT_DOCUMENT(obj);
+ Document * 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 fa47ad88d..0298042ef 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()");
- SPDocument* document = _desktop->doc();
+ Document* document = _desktop->doc();
SPObject* root = document->root;
if ( root ) {
_selectedConnection.block();
@@ -366,7 +366,7 @@ void LayersPanel::_layersChanged()
}
}
-void LayersPanel::_addLayer( SPDocument* doc, SPObject* layer, Gtk::TreeModel::Row* parentRow, SPObject* target, int level )
+void LayersPanel::_addLayer( Document* 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/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp
index dd2dc8250..bea8a096e 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) ) {
- SPDocument *doc = current_desktop->doc();
+ Document *doc = current_desktop->doc();
const Util::EnumData<LivePathEffect::EffectType>* data = combo_effecttype.get_active_data();
if (!data) return;
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp
index d15773ecb..198495f74 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(SPDocument *doc, SPItem *base) :
+Print::Print(Document *doc, SPItem *base) :
_doc (doc),
_base (base)
{
diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp
index 5f86196b1..64ea07877 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;
- SPDocument* document = sp_desktop_document(this->getDesktop());
+ Document* 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();
- SPDocument* document = sp_desktop_document(desktop);
+ Document* 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(SPDocument* document, SPFont *font, const int count)
+SPGlyph *new_glyph(Document* 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();
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* 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);
- SPDocument* doc = sp_desktop_document(desktop);
+ Document* 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);
- SPDocument* doc = sp_desktop_document(desktop);
+ Document* 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;
}
- SPDocument* doc = sp_desktop_document(desktop);
+ Document* 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());
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* 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());
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* 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);
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* 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);
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* 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);
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* 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
- SPDocument* document = sp_desktop_document(this->getDesktop());
+ Document* 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(SPDocument *document)
+SPFont *new_font(Document *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(){
- SPDocument* doc = sp_desktop_document(this->getDesktop());
+ Document* 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 e273a827c..cdd479e9d 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;
- SPDocument *doc = desktop ? desktop->doc() : 0;
+ Document *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;
- SPDocument *doc = desktop ? desktop->doc() : 0;
+ Document *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( SPDocument* document, Inkscape::XML::Node* node, Glib::ustring const& match, int r, int g, int b )
+static bool bruteForce( Document* 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 ) {
- SPDocument* document = sp_desktop_document( desktop );
+ Document* 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, SPDocument*> first = sigc::mem_fun(*this, &SwatchesPanel::_setDocument);
- sigc::slot<void, SPDocument*> base2 = first;
- sigc::slot<void,SPDesktop*, SPDocument*> slot2 = sigc::hide<0>( base2 );
+ 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 );
_documentConnection = desktop->connectDocumentReplaced( slot2 );
_setDocument( desktop->doc() );
@@ -1374,7 +1374,7 @@ void SwatchesPanel::setDesktop( SPDesktop* desktop )
}
}
-void SwatchesPanel::_setDocument( SPDocument *document )
+void SwatchesPanel::_setDocument( Document *document )
{
if ( document != _currentDocument ) {
if ( _currentDocument ) {
diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp
index 756f4df73..9619380bb 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 (SPDocument *doc)
+EditWidget::EditWidget (Document *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;
- SPDocument *doc = _desktop->doc();
+ Document *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 */
- SPDocument *doc = _desktop->doc();
+ Document *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 (SPDocument *doc)
+EditWidget::initEdit (Document *doc)
{
_desktop = new SPDesktop();
_desktop->registerEditWidget (this);
diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp
index 1b498a846..07bb6d2c1 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(SPDocument *doc) {
+void View::setDocument(Document *doc) {
g_return_if_fail(doc != NULL);
if (_doc) {
diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp
index e9f09f574..f42b29760 100644
--- a/src/ui/widget/entity-entry.cpp
+++ b/src/ui/widget/entity-entry.cpp
@@ -81,7 +81,7 @@ EntityLineEntry::~EntityLineEntry()
}
void
-EntityLineEntry::update (SPDocument *doc)
+EntityLineEntry::update (Document *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);
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *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 (SPDocument *doc)
+EntityMultiLineEntry::update (Document *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);
- SPDocument *doc = SP_ACTIVE_DOCUMENT;
+ Document *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/imageicon.cpp b/src/ui/widget/imageicon.cpp
index 6a817e30d..ead32b4b7 100644
--- a/src/ui/widget/imageicon.cpp
+++ b/src/ui/widget/imageicon.cpp
@@ -94,13 +94,13 @@ void ImageIcon::init()
}
-bool ImageIcon::showSvgDocument(const SPDocument *docArg)
+bool ImageIcon::showSvgDocument(const Document *docArg)
{
if (document)
sp_document_unref(document);
- SPDocument *doc = (SPDocument *)docArg;
+ Document *doc = (Document *)docArg;
sp_document_ref(doc);
document = doc;
@@ -127,7 +127,7 @@ bool ImageIcon::showSvgFile(const Glib::ustring &theFileName)
fileName = Glib::filename_to_utf8(fileName);
- SPDocument *doc = sp_document_new (fileName.c_str(), 0);
+ Document *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);
- SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0);
+ Document *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/licensor.cpp b/src/ui/widget/licensor.cpp
index a5f1d89be..778fbc6cc 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 (SPDocument *doc)
+Licensor::update (Document *doc)
{
/* identify the license info */
struct rdf_license_t * license = rdf_get_license (doc);
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index bfc291bc0..1b4251143 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;
}
- SPDocument *document = sp_desktop_document (desktop);
+ Document *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 02688a55e..429442779 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()) {
- SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP);
+ Document *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 93a950d1a..c2fafa001 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 *, SPDocument *> &
+sigc::signal<void, SPDesktop *, Document *> &
Panel::signalDocumentReplaced()
{
return _signal_document_replaced;
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp
index 95ddec286..5780f74ed 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, SPDocument *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, Document *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, SPDocument *doc_in)
+RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *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, SPDocument *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, Document *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,
- SPDocument * doc_in )
+ Document * 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,
- SPDocument * doc_in )
+ Document * 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,
- SPDocument *doc_in)
+ Document *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;
- SPDocument *local_doc = doc;
+ Document *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, SPDocument *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, Document *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, SPDocument *doc_in)
+ const Glib::ustring& key, Registry& wr, Inkscape::XML::Node* repr_in, Document *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,
- SPDocument* doc_in )
+ Document* 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,
- SPDocument* doc_in )
+ Document* 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,
- SPDocument * doc_in )
+ Document * doc_in )
: RegisteredWidget<Random> (label, tip)
{
init_parent(key, wr, repr_in, doc_in);
diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp
index 3a36127f4..bc5b45979 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);
- SPDocument *doc = sp_desktop_document(dt);
+ Document *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));