index 49010efdc50dae1291859edfd523471bf9736811..730188bdd0859966d3143946283a34a952ce1fd6 100644 (file)
#endif
/*
- TODO: Replace SPDocument with the new Inkscape::Document
+ TODO: Replace Document with the new Inkscape::Document
TODO: Change 'desktop's to 'view*'s
TODO: Add derivation from Inkscape::Application::RunMode
*/
//
gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL);
bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR);
- SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true);
+ Document *doc = sp_document_new (have_default? tmpl:0, true, true);
g_return_val_if_fail (doc != 0, false);
Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc);
sp_document_unref (doc);
}
/// Returns the active document
-SPDocument*
+Document*
Editor::getActiveDocument()
{
if (getActiveDesktop()) {
}
void
-Editor::addDocument (SPDocument *doc)
+Editor::addDocument (Document *doc)
{
if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
_instance->_documents = g_slist_append (_instance->_documents, doc);
}
void
-Editor::removeDocument (SPDocument *doc)
+Editor::removeDocument (Document *doc)
{
_instance->_document_set.erase(doc);
if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
}
SPDesktop*
-Editor::createDesktop (SPDocument* doc)
+Editor::createDesktop (Document* doc)
{
g_assert (doc != 0);
(new Inkscape::UI::View::EditWidget (doc))->present();
bool
Editor::isDuplicatedView (SPDesktop* dt)
{
- SPDocument const* document = dt->doc();
+ Document const* document = dt->doc();
if (!document) {
return false;
}
for ( GSList *iter = _instance->_desktops ; iter ; iter = iter->next ) {
SPDesktop *other_desktop=(SPDesktop *)iter->data;
- SPDocument *other_document=other_desktop->doc();
+ Document *other_document=other_desktop->doc();
if ( other_document == document && other_desktop != dt ) {
return true;
}