Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPDocument Class Reference

Typed SVG document implementation. More...

#include <document.h>

Classes

struct  install_reference_document
 Object used to temporarily set and then automatically clear reference document. More...
 

Public Member Functions

 SPDocument ()
 
 ~SPDocument ()
 
 SPDocument (SPDocument const &)=delete
 
SPDocumentoperator= (SPDocument const &)=delete
 
SPDocumentcreateChildDoc (std::string const &filename)
 Fetches a document and attaches it to the current document as a child href.
 
void setPages (bool enabled)
 void SPDocument::initialize_current_persp3d() { this->current_persp3d = Persp3D::document_first_persp(this); if (!this->current_persp3d) { this->current_persp3d = Persp3D::create_xml_element(this); } }
 
void prunePages (const std::string &page_nums, bool invert=false)
 Remove pages in bulk using the integer range format "1,2,3-4" etc.
 
std::unique_ptr< SPDocumentcopy () const
 Create a copy of the document, useful for modifying during save & export.
 
void rebase (Inkscape::XML::Document *new_xmldoc, bool keep_namedview=true)
 
void rebase (const gchar *file, bool keep_namedview=true)
 
void rebase (bool keep_namedview=true)
 
void setVirgin (bool Virgin)
 
bool getVirgin ()
 
const SPDocumentgetOriginalDocument () const
 
bool isModifiedSinceSave () const
 
bool isModifiedSinceAutoSave () const
 
void setModifiedSinceSave (bool const modified=true)
 Indicate to the user if the document has been modified since the last save by displaying a "*" in front of the name of the file in the window title.
 
void setModifiedSinceAutoSaveFalse ()
 
bool idle_handler ()
 An idle handler to update the document.
 
bool rerouting_handler ()
 An idle handler to reroute connectors in the document.
 
void requestModified ()
 
bool _updateDocument (int flags, unsigned int object_modified_tag=0)
 Tries to update the document state based on the modified and "update required" flags, and return true if the document has been brought fully up to date.
 
int ensureUpToDate (unsigned int object_modified_tag=0)
 Repeatedly works on getting the document updated, since sometimes it takes more than one pass to get the document updated.
 
bool addResource (char const *key, SPObject *object)
 
bool removeResource (char const *key, SPObject *object)
 
std::vector< SPObject * > const getResourceList (char const *key)
 
void process_pending_resource_changes ()
 
void do_change_filename (char const *const filename, bool const rebase)
 
void changeFilenameAndHrefs (char const *filename)
 Changes the base, name and filename members of document, and updates any relative hrefs in the document to be relative to the new base.
 
void setXMLDialogSelectedObject (SPObject *activexmltree)
 
SPObjectgetXMLDialogSelectedObject ()
 
Inkscape::EventLogget_event_log ()
 
Inkscape::PageManagergetPageManager ()
 
const Inkscape::PageManagergetPageManager () const
 
Inkscape::Colors::DocumentCMSgetDocumentCMS ()
 
const Inkscape::Colors::DocumentCMSgetDocumentCMS () const
 
void clearNodeCache ()
 
void importDefs (SPDocument *source)
 Paste SVG defs from the document retrieved from the clipboard or imported document into the active document.
 
unsigned int vacuumDocument ()
 Remove unused definitions etc.
 
Avoid::RoutergetRouter () const
 
SPRootgetRoot ()
 Returns our SPRoot.
 
SPRoot const * getRoot () const
 
SPDefsgetDefs ()
 Return the main defs object for the document.
 
Inkscape::XML::NodegetReprRoot ()
 
Inkscape::XML::NodegetReprNamedView ()
 
SPNamedViewgetNamedView ()
 Get the namedview for this document, creates it if it's not found.
 
Inkscape::XML::DocumentgetReprDoc ()
 Our Inkscape::XML::Document.
 
Inkscape::XML::Document const * getReprDoc () const
 
std::vector< Glib::ustring > getLanguages () const
 Returns preferred document languages (from most to least preferred)
 
SPDocumentgetParent ()
 
SPDocument const * getParent () const
 
Inkscape::SelectiongetSelection ()
 
CRCascadegetStyleCascade ()
 
void setDocumentFilename (char const *filename)
 A filename, or NULL.
 
char const * getDocumentFilename () const
 
void setDocumentBase (char const *document_base)
 To be used for resolving relative hrefs.
 
char const * getDocumentBase () const
 
char const * getDocumentName () const
 basename or other human-readable label for the document.
 
Inkscape::Util::Unit const * getDisplayUnit ()
 guaranteed not to return nullptr
 
void setDocumentScale (const double scaleX, const double scaleY)
 Sets document scale (by changing viewBox)
 
void setDocumentScale (const double scale)
 Sets document scale (by changing viewBox, x and y scaling equal)
 
Geom::Scale getDocumentScale (bool computed=true) const
 Returns document scale as defined by width/height (in pixels) and viewBox (real world to user-units).
 
void scaleContentBy (Geom::Scale const &delta)
 Scale the content, used by file-update and document properties when modifying the the document's viewBox while retaining the content's physical size.
 
void setWidthAndHeight (const Inkscape::Util::Quantity &width, const Inkscape::Util::Quantity &height, bool changeSize=true)
 
Geom::Point getDimensions () const
 
void setWidth (const Inkscape::Util::Quantity &width, bool changeSize=true)
 
void setHeight (const Inkscape::Util::Quantity &height, bool changeSize=true)
 
Inkscape::Util::Quantity getWidth () const
 
Inkscape::Util::Quantity getHeight () const
 
void setViewBox ()
 Set default viewbox calculated from document properties.
 
void setViewBox (const Geom::Rect &viewBox)
 
Geom::Rect getViewBox () const
 
Geom::OptRect preferredBounds () const
 
Geom::OptRect pageBounds ()
 Returns the position of the selected page or the preferredBounds()
 
void fitToRect (Geom::Rect const &rect, bool with_margins=false)
 Given a Geom::Rect that may, for example, correspond to the bbox of an object, this function fits the canvas to that rect by resizing the canvas and translating the document root into position.
 
void setupViewport (SPItemCtx *ctx)
 
const Geom::Affinedoc2dt () const
 Document to desktop coordinate transformation.
 
const Geom::Affinedt2doc () const
 Desktop to document coordinate transformation.
 
bool is_yaxisdown () const
 True if the desktop Y-axis points down, false if it points up.
 
double yaxisdir () const
 "1" if the desktop Y-axis points down, "-1" if it points up.
 
bool get_origin_follows_page ()
 
void set_origin_follows_page (bool on)
 
sigc::signal< void(double)> get_y_axis_flipped ()
 
void bindObjectToId (char const *id, SPObject *object)
 
SPObjectgetObjectById (std::string const &id) const
 
SPObjectgetObjectById (char const *id) const
 
SPObjectgetObjectByHref (std::string const &href) const
 
SPObjectgetObjectByHref (char const *href) const
 
void bindObjectToRepr (Inkscape::XML::Node *repr, SPObject *object)
 
SPObjectgetObjectByRepr (Inkscape::XML::Node *repr) const
 
std::vector< SPObject * > getObjectsByClass (Glib::ustring const &klass) const
 
std::vector< SPObject * > getObjectsByElement (Glib::ustring const &element, bool custom=false) const
 
std::vector< SPObject * > getObjectsBySelector (Glib::ustring const &selector) const
 
std::string generate_unique_id (char const *prefix)
 Generate a document-wide unique id.
 
void set_reference_document (SPDocument *document)
 Set the reference document object.
 
SPDocumentget_reference_document ()
 
std::vector< SPItem * > getItemsInBox (unsigned int dkey, Geom::Rect const &box, bool take_hidden=false, bool take_insensitive=false, bool take_groups=true, bool enter_groups=false, bool enter_layers=true) const
 Return list of items, contained in box.
 
std::vector< SPItem * > getItemsPartiallyInBox (unsigned int dkey, Geom::Rect const &box, bool take_hidden=false, bool take_insensitive=false, bool take_groups=true, bool enter_groups=false, bool enter_layers=true) const
 Get items whose bounding box overlaps with given area.
 
SPItemgetItemAtPoint (unsigned int key, Geom::Point const &p, bool into_groups, SPItem *upto=nullptr) const
 
std::vector< SPItem * > getItemsAtPoints (unsigned const key, std::vector< Geom::Point > points, bool all_layers=true, bool topmost_only=true, size_t limit=0, bool active_only=true) const
 
SPItemgetGroupAtPoint (unsigned int key, Geom::Point const &p) const
 
void setCurrentPersp3D (Persp3D *const persp)
 
Persp3DgetCurrentPersp3D ()
 
void update_lpobjs ()
 
void setCurrentPersp3DImpl (Persp3DImpl *const persp_impl)
 
Persp3DImplgetCurrentPersp3DImpl ()
 
void getPerspectivesInDefs (std::vector< Persp3D * > &list) const
 
unsigned int numPerspectivesInDefs () const
 
unsigned long serial () const
 
bool isSeeking () const
 
bool isPartial () const
 
void reset_key (void *dummy)
 
Glib::ustring const & action_key () const
 
bool isSensitive () const
 
void queueForOrphanCollection (SPObject *object)
 
void collectOrphans ()
 
Glib::RefPtr< Gio::SimpleActionGroup > getActionGroup ()
 
void addUndoObserver (Inkscape::UndoStackObserver &observer)
 Add the observer to the document's undo listener The caller is in charge of freeing any memory allocated to the observer.
 
void removeUndoObserver (Inkscape::UndoStackObserver &observer)
 
sigc::connection connectDestroy (sigc::signal< void()>::slot_type slot)
 
sigc::connection connectModified (ModifiedSignal::slot_type slot)
 
sigc::connection connectFilenameSet (FilenameSetSignal::slot_type slot)
 
sigc::connection connectCommit (CommitSignal::slot_type slot)
 
sigc::connection connectBeforeCommit (BeforeCommitSignal::slot_type slot)
 
sigc::connection connectIdChanged (const char *id, IDChangedSignal::slot_type slot)
 
sigc::connection connectResourcesChanged (char const *key, SPDocument::ResourcesChangedSignal::slot_type slot)
 
sigc::connection connectReconstructionStart (ReconstructionStart::slot_type slot, bool first=false)
 
sigc::connection connectReconstructionFinish (ReconstructionFinish::slot_type slot)
 
sigc::connection connectSavedOrModified (sigc::slot< void()> &&slot)
 
void _emitModified (unsigned int object_modified_tag=0)
 
void emitReconstructionStart ()
 
void emitReconstructionFinish ()
 

Static Public Member Functions

static int get_new_doc_number ()
 
static std::unique_ptr< SPDocumentcreateDoc (Inkscape::XML::Document *rdoc, char const *filename, char const *base, char const *name, bool keepalive, SPDocument *parent=nullptr)
 
static std::unique_ptr< SPDocumentcreateNewDoc (char const *filename, bool keepalive, bool make_new=false, SPDocument *parent=nullptr)
 Fetches document from filename, or creates new, if NULL; public document appears in document list.
 
static std::unique_ptr< SPDocumentcreateNewDocFromMem (std::span< char const > buffer, bool keepalive, std::string const &filename="")
 
static SPItemgetItemFromListAtPointBottom (unsigned int dkey, SPGroup *group, const std::vector< SPItem * > &list, Geom::Point const &p, bool take_insensitive=false)
 Returns the bottommost item from the list which is at the point, or NULL if none.
 

Public Attributes

unsigned update_in_progress = 0
 For sanity check in SPObject::requestDisplayUpdate.
 
std::map< std::string, std::vector< SPObject * > > resources
 
ResourcesChangedSignalMap resources_changed_signals
 

Private Types

typedef sigc::signal< void(SPObject *)> IDChangedSignal
 
typedef sigc::signal< void()> ResourcesChangedSignal
 
typedef sigc::signal< void(unsigned)> ModifiedSignal
 
typedef sigc::signal< void(char const *)> FilenameSetSignal
 
typedef sigc::signal< void(double, double)> ResizedSignal
 
typedef sigc::signal< void()> ReconstructionStart
 
typedef sigc::signal< void()> ReconstructionFinish
 
typedef sigc::signal< void()> CommitSignal
 
typedef sigc::signal< void()> BeforeCommitSignal
 
typedef std::map< GQuark, SPDocument::IDChangedSignalIDChangedSignalMap
 
typedef std::map< GQuark, SPDocument::ResourcesChangedSignalResourcesChangedSignalMap
 

Private Member Functions

void _importDefsNode (SPDocument *source, Inkscape::XML::Node *defs, Inkscape::XML::Node *target_defs)
 
std::deque< SPItem * > const & get_flat_item_list (unsigned int dkey, bool into_groups, bool active_only) const
 Turn the SVG DOM into a cached flat list of nodes that can be searched from top-down.
 
SPDocument_searchForChild (std::string const &filename, SPDocument const *avoid=nullptr)
 
bool has_yaxis_orientation_changed ()
 Detect Y-axis orientation change.
 
double update_desktop_affine ()
 Update desktop transform after Y-axis orientation change.
 

Private Attributes

SPObject_activexmltree
 
std::unique_ptr< Inkscape::PageManager_page_manager
 
std::unique_ptr< Inkscape::Colors::DocumentCMS_cms_manager
 
std::queue< GQuarkpending_resource_changes
 
std::unique_ptr< Avoid::Router_router
 
std::unique_ptr< Inkscape::Selection_selection
 
bool keepalive
 false if temporary document (e.g. to generate a PNG for display in a dialog).
 
bool virgin
 Has the document never been touched?
 
bool modified_since_save = false
 
bool modified_since_autosave = false
 
sigc::connection modified_connection
 
sigc::connection rerouting_connection
 
Inkscape::XML::Documentrdoc
 Our Inkscape::XML::Document.
 
Inkscape::XML::Noderroot
 Root element of Inkscape::XML::Document.
 
SPRootroot
 Our SPRoot.
 
std::vector< std::unique_ptr< SPDocument > > _child_documents
 
SPDocument_parent_document = nullptr
 
SPDocument const * _original_document = nullptr
 
SPDocument_ref_document = nullptr
 
CRCascadestyle_cascade
 
Geom::Affine _doc2dt
 
char * document_filename
 A filename, or NULL.
 
char * document_base
 To be used for resolving relative hrefs.
 
char * document_name
 basename or other human-readable label for the document.
 
std::map< std::string, SPObject * > iddef
 
std::map< Inkscape::XML::Node *, SPObject * > reprdef
 
std::map< unsigned long, std::deque< SPItem * > > _node_cache
 
Persp3Dcurrent_persp3d
 Currently 'active' perspective (to which, e.g., newly created boxes are attached)
 
Persp3DImplcurrent_persp3d_impl
 
std::unique_ptr< Inkscape::EventLog_event_log
 
bool sensitive
 
Inkscape::XML::Eventpartial
 
std::deque< Inkscape::Event * > undo
 
std::deque< Inkscape::Event * > redo
 
Inkscape::CompositeUndoStackObserver undoStackObservers
 
Inkscape::ConsoleOutputUndoObserver console_output_undo_observer
 
bool seeking
 
unsigned long _serial
 
Glib::ustring actionkey
 
double action_expires
 
Glib::Timer undo_timer
 
unsigned long object_id_counter
 
std::vector< SPObject * > _collection_queue
 Orphans.
 
Glib::RefPtr< Gio::SimpleActionGroup > action_group
 
IDChangedSignalMap id_changed_signals
 Dictionary of signals for id changes.
 
SPDocument::ModifiedSignal modified_signal
 
SPDocument::FilenameSetSignal filename_set_signal
 
SPDocument::ReconstructionStart _reconstruction_start_signal
 
SPDocument::ReconstructionFinish _reconstruction_finish_signal
 
SPDocument::CommitSignal commit_signal
 
SPDocument::BeforeCommitSignal before_commit_signal
 
sigc::connection _desktop_activated_connection
 
sigc::signal< void()> destroySignal
 
sigc::signal< void()> _saved_or_modified_signal
 
sigc::signal< void(double)> _y_axis_flipped
 

Detailed Description

Typed SVG document implementation.

SPDocument serves as the container of both model trees (agnostic XML and typed object tree), and implements all of the document-level functionality used by the program.

Many document level operations, like load, save, print, export and so on, use SPDocument as their basic datatype.

SPDocument implements undo and redo stacks and an id-based object dictionary. Thanks to unique id attributes, the latter can be used to map from the XML tree back to the object tree.

SPDocument performs the basic operations needed for asynchronous update notification (SPObject ::modified virtual method), and implements the 'modified' signal, as well.

Definition at line 102 of file document.h.

Member Typedef Documentation

◆ BeforeCommitSignal

typedef sigc::signal<void ()> SPDocument::BeforeCommitSignal
private

Definition at line 467 of file document.h.

◆ CommitSignal

typedef sigc::signal<void ()> SPDocument::CommitSignal
private

Definition at line 466 of file document.h.

◆ FilenameSetSignal

typedef sigc::signal<void (char const *)> SPDocument::FilenameSetSignal
private

Definition at line 462 of file document.h.

◆ IDChangedSignal

typedef sigc::signal<void (SPObject *)> SPDocument::IDChangedSignal
private

Definition at line 459 of file document.h.

◆ IDChangedSignalMap

Definition at line 469 of file document.h.

◆ ModifiedSignal

typedef sigc::signal<void (unsigned)> SPDocument::ModifiedSignal
private

Definition at line 461 of file document.h.

◆ ReconstructionFinish

typedef sigc::signal<void ()> SPDocument::ReconstructionFinish
private

Definition at line 465 of file document.h.

◆ ReconstructionStart

typedef sigc::signal<void ()> SPDocument::ReconstructionStart
private

Definition at line 464 of file document.h.

◆ ResizedSignal

typedef sigc::signal<void (double, double)> SPDocument::ResizedSignal
private

Definition at line 463 of file document.h.

◆ ResourcesChangedSignal

typedef sigc::signal<void ()> SPDocument::ResourcesChangedSignal
private

Definition at line 460 of file document.h.

◆ ResourcesChangedSignalMap

Definition at line 470 of file document.h.

Constructor & Destructor Documentation

◆ SPDocument() [1/2]

◆ ~SPDocument()

◆ SPDocument() [2/2]

SPDocument::SPDocument ( SPDocument const &  )
delete

Member Function Documentation

◆ _emitModified()

void SPDocument::_emitModified ( unsigned int  object_modified_tag = 0)

Definition at line 2293 of file document.cpp.

References clearNodeCache(), SPObject::emitModified(), modified_signal, and root.

Referenced by _updateDocument(), and SPItem::setLocked().

◆ _importDefsNode()

◆ _searchForChild()

SPDocument * SPDocument::_searchForChild ( std::string const &  filename,
SPDocument const *  avoid = nullptr 
)
private

Definition at line 640 of file document.cpp.

References _child_documents, c, and document_filename.

◆ _updateDocument()

bool SPDocument::_updateDocument ( int  flags,
unsigned int  object_modified_tag = 0 
)

Tries to update the document state based on the modified and "update required" flags, and return true if the document has been brought fully up to date.

Definition at line 1453 of file document.cpp.

References _emitModified(), _y_axis_flipped, child, getNamedView(), has_yaxis_orientation_changed(), SPObject::mflags, root, setupViewport(), shift(), SPObject::uflags, update_desktop_affine(), and SPObject::updateDisplay().

Referenced by ensureUpToDate(), and idle_handler().

◆ action_key()

Glib::ustring const & SPDocument::action_key ( ) const
inline

Definition at line 364 of file document.h.

References actionkey.

Referenced by Inkscape::Selection::rotateAnchored().

◆ addResource()

◆ addUndoObserver()

void SPDocument::addUndoObserver ( Inkscape::UndoStackObserver observer)

Add the observer to the document's undo listener The caller is in charge of freeing any memory allocated to the observer.

Parameters
observer

Definition at line 2226 of file document.cpp.

References Inkscape::CompositeUndoStackObserver::add(), and undoStackObservers.

Referenced by Inkscape::Extension::Implementation::Script::PreviewObserver::connect().

◆ bindObjectToId()

void SPDocument::bindObjectToId ( char const *  id,
SPObject object 
)

◆ bindObjectToRepr()

void SPDocument::bindObjectToRepr ( Inkscape::XML::Node repr,
SPObject object 
)

Definition at line 1322 of file document.cpp.

References clearNodeCache(), and reprdef.

Referenced by SPObject::invoke_build(), and SPObject::releaseReferences().

◆ changeFilenameAndHrefs()

void SPDocument::changeFilenameAndHrefs ( char const *  filename)

Changes the base, name and filename members of document, and updates any relative hrefs in the document to be relative to the new base.

Definition at line 1128 of file document.cpp.

References do_change_filename().

Referenced by Inkscape::Extension::save().

◆ clearNodeCache()

void SPDocument::clearNodeCache ( )
inline

Definition at line 191 of file document.h.

References _node_cache.

Referenced by _emitModified(), bindObjectToRepr(), and Inkscape::LayerManager::setCurrentLayer().

◆ collectOrphans()

void SPDocument::collectOrphans ( )

◆ connectBeforeCommit()

sigc::connection SPDocument::connectBeforeCommit ( BeforeCommitSignal::slot_type  slot)

Definition at line 2257 of file document.cpp.

References before_commit_signal.

Referenced by Inkscape::LivePathEffect::Effect::Effect().

◆ connectCommit()

sigc::connection SPDocument::connectCommit ( CommitSignal::slot_type  slot)

Definition at line 2252 of file document.cpp.

References commit_signal.

◆ connectDestroy()

sigc::connection SPDocument::connectDestroy ( sigc::signal< void()>::slot_type  slot)

Definition at line 2237 of file document.cpp.

References destroySignal.

Referenced by Inkscape::UI::Dialog::IconPreviewPanel::documentReplaced().

◆ connectFilenameSet()

sigc::connection SPDocument::connectFilenameSet ( FilenameSetSignal::slot_type  slot)

Definition at line 2247 of file document.cpp.

References filename_set_signal.

Referenced by SPDesktop::_attachDocument().

◆ connectIdChanged()

sigc::connection SPDocument::connectIdChanged ( const char *  id,
IDChangedSignal::slot_type  slot 
)

Definition at line 2262 of file document.cpp.

References id_changed_signals.

Referenced by Inkscape::URIReference::attach().

◆ connectModified()

◆ connectReconstructionFinish()

sigc::connection SPDocument::connectReconstructionFinish ( ReconstructionFinish::slot_type  slot)

◆ connectReconstructionStart()

sigc::connection SPDocument::connectReconstructionStart ( ReconstructionStart::slot_type  slot,
bool  first = false 
)

◆ connectResourcesChanged()

sigc::connection SPDocument::connectResourcesChanged ( char const *  key,
SPDocument::ResourcesChangedSignal::slot_type  slot 
)

◆ connectSavedOrModified()

sigc::connection SPDocument::connectSavedOrModified ( sigc::slot< void()> &&  slot)

Definition at line 2288 of file document.cpp.

References _saved_or_modified_signal.

Referenced by SPDesktop::_attachDocument().

◆ copy()

◆ createChildDoc()

SPDocument * SPDocument::createChildDoc ( std::string const &  filename)

Fetches a document and attaches it to the current document as a child href.

Definition at line 619 of file document.cpp.

References _child_documents, createNewDoc(), and document_base.

Referenced by Inkscape::URIReference::attach(), and SPAnchor::updatePageAnchor().

◆ createDoc()

std::unique_ptr< SPDocument > SPDocument::createDoc ( Inkscape::XML::Document rdoc,
char const *  filename,
char const *  base,
char const *  name,
bool  keepalive,
SPDocument parent = nullptr 
)
static

◆ createNewDoc()

◆ createNewDocFromMem()

◆ do_change_filename()

◆ doc2dt()

◆ dt2doc()

◆ emitReconstructionFinish()

void SPDocument::emitReconstructionFinish ( )

Reference to the old persp3d object is invalid after reconstruction. initialize_current_persp3d();

Definition at line 2308 of file document.cpp.

References _reconstruction_finish_signal, and resources_changed_signals.

Referenced by file_import(), Inkscape::DocumentUndo::perform_document_update(), rebase(), Inkscape::DocumentUndo::redo(), and sp_import_document().

◆ emitReconstructionStart()

void SPDocument::emitReconstructionStart ( )

Definition at line 2301 of file document.cpp.

References _reconstruction_start_signal.

Referenced by rebase().

◆ ensureUpToDate()

gint SPDocument::ensureUpToDate ( unsigned int  object_modified_tag = 0)

Repeatedly works on getting the document updated, since sometimes it takes more than one pass to get the document updated.

But it usually should not take more than a few loops, and certainly never more than 32 iterations. So we bail out if we hit 32 iterations, since this typically indicates we're stuck in an update loop. Optional 'object_modified_tag' (see sp-object.h) can be passed to report along with modification flags.

Definition at line 1495 of file document.cpp.

References _router, _updateDocument(), counter, document_filename, modified_connection, and rerouting_connection.

Referenced by SPDesktop::_attachDocument(), Inkscape::UI::Tools::ConnectorTool::_flushWhite(), Inkscape::UI::Tools::ConnectorTool::_handleButtonRelease(), Inkscape::UI::Tools::ConnectorTool::_setActiveShape(), Inkscape::Extension::Internal::SvgBuilder::_shouldClip(), Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::UI::Dialog::GridArrangeTab::arrange(), Inkscape::Colors::DocumentCMS::attachProfileToDoc(), SPMeshNodeArray::color_pick(), Inkscape::convert_text_to_curves(), Inkscape::ObjectSet::createBitmapCopy(), InkFileExportCmd::do_export_png(), InkFileExportCmd::do_export_vector(), Inkscape::UI::Dialog::Export::exportVector(), Inkscape::UI::Dialog::Export::exportVector(), file_import(), file_import_pages(), Inkscape::ObjectSet::fillBetweenMany(), fit_canvas_to_drawing(), Inkscape::UI::Tools::fit_item(), SPItem::getCenter(), getGradientCoords(), Inkscape::Extension::Internal::latex_render_document_text_to_file(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_value_changed(), Inkscape::UI::Widget::StrokeStyle::markerSelectCB(), Inkscape::DocumentUndo::maybeDone(), object_align(), Inkscape::Extension::Internal::pdf_render_document_to_file(), Inkscape::DocumentUndo::perform_document_update(), Inkscape::Extension::Internal::Emf::print_document_to_file(), Inkscape::Extension::Internal::Wmf::print_document_to_file(), InkscapeApplication::process_document(), prunePages(), Inkscape::Extension::Internal::ps_print_document_to_file(), Inkscape::Extension::Internal::LatexOutput::save(), SPItem::setCenter(), Inkscape::ObjectSet::setMask(), Inkscape::Colors::DocumentCMS::setRenderingIntent(), Inkscape::Extension::Internal::Metafile::setViewBoxIfMissing(), InkviewWindow::show_document(), sp_export_png_file(), Inkscape::UI::Tools::sp_flood_do_flood_fill(), sp_generate_internal_bitmap(), sp_gradient_convert_to_userspace(), sp_gradient_fork_private_if_necessary(), sp_gradient_reset_to_userspace(), sp_import_document(), sp_print_document(), sp_print_document_to_file(), sp_validate_marker(), Inkscape::UI::Tools::spdc_flush_white(), text_put_on_path(), Inkscape::ObjectSet::tile(), Inkscape::UI::Tools::MeasureTool::toGuides(), Inkscape::UI::Tools::MeasureTool::toItem(), Inkscape::UI::Tools::MeasureTool::toMarkDimension(), Inkscape::ObjectSet::toMarker(), Inkscape::UI::Tools::MeasureTool::toPhantom(), Inkscape::ObjectSet::toSymbol(), Inkscape::UI::Dialog::CloneTiler::trace_setup(), Inkscape::UI::Dialog::CloneTiler::unclump(), Inkscape::ObjectSet::unsetMask(), SPSymbol::unSymbol(), and Inkscape::ObjectSet::untile().

◆ fitToRect()

◆ generate_unique_id()

std::string SPDocument::generate_unique_id ( char const *  prefix)

Generate a document-wide unique id.

Generates an id string not in use by any object in the document. The generated string is based on the given prefix by appending a number.

Definition at line 1304 of file document.cpp.

References getObjectById(), object_id_counter, and result.

Referenced by SPObject::generate_unique_id(), and sp_document_default_gradient_vector().

◆ get_event_log()

◆ get_flat_item_list()

std::deque< SPItem * > const & SPDocument::get_flat_item_list ( unsigned int  dkey,
bool  into_groups,
bool  active_only 
) const
private

Turn the SVG DOM into a cached flat list of nodes that can be searched from top-down.

The list can be persisted, which improves "find at multiple points" speed.

Definition at line 1683 of file document.cpp.

References _build_flat_item_list(), _node_cache, key, and root.

Referenced by getItemAtPoint(), and getItemsAtPoints().

◆ get_new_doc_number()

int SPDocument::get_new_doc_number ( )
static

Definition at line 218 of file document.cpp.

References doc_count.

Referenced by Inkscape::Extension::Implementation::Script::new_from_template().

◆ get_origin_follows_page()

◆ get_reference_document()

SPDocument * SPDocument::get_reference_document ( )

Definition at line 2326 of file document.cpp.

References _ref_document.

Referenced by SPStyle::_mergeObjectStylesheet().

◆ get_y_axis_flipped()

sigc::signal< void(double)> SPDocument::get_y_axis_flipped ( )
inline

Definition at line 283 of file document.h.

References _y_axis_flipped.

Referenced by SPDesktop::_attachDocument().

◆ getActionGroup()

◆ getCurrentPersp3D()

Persp3D * SPDocument::getCurrentPersp3D ( )

Definition at line 253 of file document.cpp.

References current_persp3d, Persp3D::document_first_persp(), and getPerspectivesInDefs().

Referenced by SPBox3D::write().

◆ getCurrentPersp3DImpl()

Persp3DImpl * SPDocument::getCurrentPersp3DImpl ( )
inline

Definition at line 349 of file document.h.

References current_persp3d_impl.

◆ getDefs()

SPDefs * SPDocument::getDefs ( )

Return the main defs object for the document.

Definition at line 245 of file document.cpp.

References SPRoot::defs, and root.

Referenced by SPPattern::_chain(), Inkscape::Extension::Internal::SvgBuilder::_createClip(), Inkscape::Extension::Internal::SvgBuilder::_createGradient(), Inkscape::Extension::Internal::SvgBuilder::_createMask(), Inkscape::Extension::Internal::SvgBuilder::_createTilingPattern(), Inkscape::Extension::Internal::SvgBuilder::_flushText(), Inkscape::Extension::Internal::SvgBuilder::_getColorProfile(), _importDefsNode(), Inkscape::LivePathEffect::LPEPowerClip::add(), add_actions_processing(), SPHatch::clone_if_necessary(), Inkscape::ObjectSet::cloneOriginalPathLPE(), SPClipPath::create(), SPMask::create(), Persp3D::create_xml_element(), Inkscape::LivePathEffect::Effect::createAndApply(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::ColorProfile::createFromProfile(), Inkscape::LivePathEffect::LPEBool::doBeforeEffect(), Persp3D::document_first_persp(), Inkscape::UI::Dialog::SvgFontsDialog::documentReplaced(), Inkscape::Extension::Internal::Filter::Filter::effect(), Inkscape::UI::Tools::ensure_persp_in_defs(), Inkscape::ObjectSet::fillBetweenMany(), Inkscape::UI::Widget::find_marker(), LivePathEffectObject::fork_private_if_necessary(), generate_linked_fill(), generate_marker(), Inkscape::UI::Widget::MarkerComboBox::get_marker_list(), get_stock_item(), importDefs(), modify_filter_gaussian_blur_from_item(), Inkscape::UI::Tools::MeshTool::new_default(), new_filter(), new_filter_blend_gaussian_blur(), new_filter_gaussian_blur(), Inkscape::UI::Dialog::new_font(), Persp3D::print_debugging_info_all(), Inkscape::Extension::PathEffect::processPathEffects(), SPPattern::produce(), Inkscape::UI::Widget::GradientVectorSelector::set_gradient(), Inkscape::UI::Toolbar::GradientToolbar::setDesktop(), Inkscape::UI::Widget::MarkerComboBox::setDocument(), Inkscape::UI::Tools::MeasureTool::setMarker(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::Selection::setState(), sp_copy_resource(), sp_document_default_gradient_vector(), sp_gradient_fork_private_if_necessary(), sp_gradient_fork_vector_if_necessary(), sp_gradient_get_private_normalized(), sp_gradient_load_from_svg(), sp_marker_fork_if_necessary(), sp_marker_load_from_svg(), Inkscape::ObjectSet::toSymbol(), and Inkscape::LivePathEffect::LPEPowerMask::tryForkMask().

◆ getDimensions()

◆ getDisplayUnit()

◆ getDocumentBase()

◆ getDocumentCMS() [1/2]

◆ getDocumentCMS() [2/2]

const Inkscape::Colors::DocumentCMS & SPDocument::getDocumentCMS ( ) const
inline

Definition at line 168 of file document.h.

References _cms_manager.

◆ getDocumentFilename()

◆ getDocumentName()

◆ getDocumentScale()

Geom::Scale SPDocument::getDocumentScale ( bool  computed = true) const

Returns document scale as defined by width/height (in pixels) and viewBox (real world to user-units).

Definition at line 773 of file document.cpp.

References SVGLength::computed, Geom::GenericRect< C >::height(), SPDimensions::height, root, scale, SVGLength::value, SPViewBox::viewBox, SPViewBox::viewBox_set, Geom::GenericRect< C >::width(), and SPDimensions::width.

Referenced by Inkscape::UI::Tools::PencilTool::_addFreehandPoint(), SPGrid::_checkOldGrid(), Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::Extension::Internal::PrintEmf::begin(), SPPage::copyFrom(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), Inkscape::LivePathEffect::LPETiling::doBeforeEffect(), Inkscape::LivePathEffect::LPEFilletChamfer::doBeforeEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doBeforeEffect(), Inkscape::LivePathEffect::LPERuler::doEffect_pwd2(), Inkscape::LivePathEffect::LPEFilletChamfer::doOnApply(), Inkscape::Extension::Internal::Grid::effect(), Inkscape::Extension::Internal::Grid::effect(), file_import_pages(), Inkscape::UI::Tools::MarkerTool::get_marker_transform(), SPPage::getBleedLabel(), SPPage::getDocumentBleed(), SPPage::getDocumentMargin(), SPPage::getDocumentRect(), SPGrid::getEffectiveOriginAndSpacing(), SPPage::getMarginLabel(), insert_bounding_boxes(), Inkscape::PageManager::newDocumentPage(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), Inkscape::Extension::Internal::CairoRenderer::renderPage(), Inkscape::LivePathEffect::LPERuler::ruler_mark(), SPPage::set(), Inkscape::UI::Dialog::DocumentProperties::set_content_scale(), SPPage::setBleed(), SPPage::setDocumentRect(), SPPage::setMargin(), SPPage::setMarginSide(), SPGrid::setPrefValues(), sp_file_convert_dpi(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::UI::Tools::spdc_create_single_dot(), SPNamedView::translateGrids(), SPGrid::update(), Inkscape::UI::Toolbar::PencilToolbar::update_width_value(), and Inkscape::LivePathEffect::LPEFilletChamfer::updateAmount().

◆ getGroupAtPoint()

SPItem * SPDocument::getGroupAtPoint ( unsigned int  key,
Geom::Point const &  p 
) const

Definition at line 1857 of file document.cpp.

References find_group_at_point(), key, and root.

Referenced by SPDesktop::getGroupAtPoint().

◆ getHeight()

◆ getItemAtPoint()

SPItem * SPDocument::getItemAtPoint ( unsigned int  key,
Geom::Point const &  p,
bool  into_groups,
SPItem upto = nullptr 
) const

Definition at line 1851 of file document.cpp.

References find_item_at_point(), get_flat_item_list(), and key.

Referenced by SPDesktop::getItemAtPoint().

◆ getItemFromListAtPointBottom()

SPItem * SPDocument::getItemFromListAtPointBottom ( unsigned int  dkey,
SPGroup group,
const std::vector< SPItem * > &  list,
Geom::Point const &  p,
bool  take_insensitive = false 
)
static

◆ getItemsAtPoints()

std::vector< SPItem * > SPDocument::getItemsAtPoints ( unsigned const  key,
std::vector< Geom::Point points,
bool  all_layers = true,
bool  topmost_only = true,
size_t  limit = 0,
bool  active_only = true 
) const

◆ getItemsInBox()

std::vector< SPItem * > SPDocument::getItemsInBox ( unsigned int  dkey,
Geom::Rect const &  box,
bool  take_hidden = false,
bool  take_insensitive = false,
bool  take_groups = true,
bool  enter_groups = false,
bool  enter_layers = true 
) const

Return list of items, contained in box.

Parameters
boxarea to find items, in document coordinates

Definition at line 1787 of file document.cpp.

References find_items_in_area(), is_within(), and root.

Referenced by SPPage::getExclusiveItems(), and Inkscape::UI::Tools::NodeTool::select_area().

◆ getItemsPartiallyInBox()

std::vector< SPItem * > SPDocument::getItemsPartiallyInBox ( unsigned int  dkey,
Geom::Rect const &  box,
bool  take_hidden = false,
bool  take_insensitive = false,
bool  take_groups = true,
bool  enter_groups = false,
bool  enter_layers = true 
) const

Get items whose bounding box overlaps with given area.

Parameters
dkeydesktop view in use
boxarea to find items, in document coordinates
take_hiddenget hidden items
take_insensitiveget insensitive items
take_groupsget also the groups
enter_groupsget items inside groups
Returns
Return list of items, that the parts of the item contained in box

Definition at line 1804 of file document.cpp.

References find_items_in_area(), overlaps(), and root.

Referenced by Inkscape::UI::Tools::fit_item(), SPPage::getOverlappingItems(), Inkscape::PageManager::getOverlappingItems(), and Inkscape::UI::Tools::MeasureTool::showCanvasItems().

◆ getLanguages()

std::vector< Glib::ustring > SPDocument::getLanguages ( ) const

Returns preferred document languages (from most to least preferred)

This currently includes (in order):

  • language set in RDF metadata
  • languages suitable for system locale (influenced by Inkscape GUI locale preference)

Definition at line 1348 of file document.cpp.

References _parent_document, getLanguages(), rdf_find_entity(), and rdf_get_work_entity().

Referenced by evaluateSystemLanguage(), and getLanguages().

◆ getNamedView()

◆ getObjectByHref() [1/2]

SPObject * SPDocument::getObjectByHref ( char const *  href) const

Definition at line 1196 of file document.cpp.

References getObjectById().

◆ getObjectByHref() [2/2]

◆ getObjectById() [1/2]

SPObject * SPDocument::getObjectById ( char const *  id) const

Definition at line 1174 of file document.cpp.

References _parent_document, _ref_document, getObjectById(), and iddef.

◆ getObjectById() [2/2]

SPObject * SPDocument::getObjectById ( std::string const &  id) const

Definition at line 1159 of file document.cpp.

References _parent_document, _ref_document, getObjectById(), and iddef.

Referenced by SPPattern::_chain(), Inkscape::Extension::Internal::SvgBuilder::_getGradientNode(), Inkscape::Selection::_objectForXMLNode(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::URIReference::attach(), Inkscape::Extension::Internal::SvgBuilder::beginLayer(), Inkscape::Extension::Internal::SvgBuilder::beginMarkedContent(), SPObject::build(), change_clashing_ids(), SPHatch::clone_if_necessary(), Inkscape::ObjectSet::cloneOriginalPathLPE(), SPClipPath::create(), SPMask::create(), Inkscape::create_layer(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), InkFileExportCmd::do_export_png(), Inkscape::LivePathEffect::LPEBool::doBeforeEffect(), Inkscape::UI::Dialog::DocumentResources::DocumentResources(), Inkscape::LivePathEffect::LPECopyRotate::doOnOpen(), Inkscape::LivePathEffect::LPEMirrorSymmetry::doOnOpen(), Inkscape::LivePathEffect::LPEPowerClip::doOnRemove(), Inkscape::LivePathEffect::LPEPowerMask::doOnRemove(), Inkscape::ObjectSet::duplicate(), Inkscape::UI::Dialog::Export::exportVector(), Inkscape::LivePathEffect::extractFirstPoint(), find_references(), SPObject::fixTmpSuccessors(), generate_marker(), generate_similar_unique_id(), SPObject::generate_unique_id(), generate_unique_id(), Inkscape::UI::Dialog::get_guide(), get_linked_fill(), get_stock_item(), SPAvoidRef::getAttachedConnectors(), SPAvoidRef::getAttachedShapes(), getMarkerObj(), getObjectByHref(), getObjectByHref(), getObjectById(), getObjectById(), Inkscape::UI::Widget::PaintSelector::getPattern(), insert_text_fallback(), SPObject::invoke_build(), item_to_paths(), Inkscape::LivePathEffect::SatelliteArrayParam::on_link_button_click(), Inkscape::LivePathEffect::SatelliteArrayParam::on_remove_button_click(), Inkscape::Extension::Internal::SvgBuilder::popGroup(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), SPPattern::produce(), Inkscape::UI::Dialog::StyleDialog::readStyleElement(), SPDesktop::reconstruction_finish(), Inkscape::UI::Dialog::IconPreviewPanel::refreshPreview(), Inkscape::UI::Dialog::DocumentProperties::removeEmbeddedScript(), Inkscape::ObjectSet::removeLPESRecursive(), rename_id(), select_by_id(), Inkscape::UI::Dialog::LivePathEffectEditor::selection_info(), SPObject::set(), Inkscape::UI::Tools::MeasureTool::setMarkers(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::ObjectSet::setReprList(), Inkscape::Selection::setState(), SPObject::setTmpSuccessor(), sp_gradient_load_from_svg(), Inkscape::UI::Dialog::sp_icon_doc_icon(), sp_import_document(), sp_item_list_to_curves(), sp_marker_load_from_svg(), sp_namedview_update_layers_from_document(), sp_pattern_load_from_svg(), sp_uri_reference_resolve(), Inkscape::UI::Tools::spdc_apply_powerstroke_shape(), Inkscape::LivePathEffect::LPESlice::split(), text_categorize_refs(), Inkscape::LivePathEffect::LPEBool::transform_multiply(), Inkscape::LivePathEffect::LPEPowerMask::tryForkMask(), unselect_by_id(), Inkscape::LivePathEffect::LPEPowerClip::upd(), and Inkscape::UI::Widget::PatternEditor::update_doc_pattern_list().

◆ getObjectByRepr()

SPObject * SPDocument::getObjectByRepr ( Inkscape::XML::Node repr) const

Definition at line 1335 of file document.cpp.

References reprdef.

Referenced by SPPattern::_chain(), _importDefsNode(), Inkscape::UI::Tools::EraserTool::_insertAcidIntoDocument(), Inkscape::Selection::_objectForXMLNode(), Inkscape::Extension::Internal::SvgBuilder::_shouldClip(), Inkscape::LivePathEffect::LPEPowerClip::add(), Inkscape::ObjectSet::add(), SPObject::appendChildRepr(), Inkscape::UI::Dialog::CloneTiler::apply(), Inkscape::ObjectSet::breakApart(), SPClipPath::child_added(), SPHatch::child_added(), SPMask::child_added(), SPNamedView::child_added(), SPRoot::child_added(), Inkscape::UI::Dialog::XmlTree::cmd_delete_node(), SPBox3D::convert_to_group(), create_flowtext_with_internal_frame(), Inkscape::create_layer(), SPGrid::create_new(), SPFont::create_new_glyph(), SPGuide::createSPGuide(), Inkscape::UI::Tools::do_trace(), Inkscape::ObjectSet::duplicate(), file_import_pages(), Inkscape::ObjectSet::fillBetweenMany(), filter_add_primitive(), Inkscape::fixBrokenLinks(), flowtext_to_text(), LivePathEffectObject::fork_private_if_necessary(), generate_linked_fill(), get_closest_child_by_repr(), getNamedView(), Inkscape::UI::Dialog::ObjectsPanel::getObject(), Inkscape::ObjectSet::group(), Inkscape::ObjectSet::lowerToBottom(), modify_filter_gaussian_blur_from_item(), SPItem::moveTo(), Inkscape::UI::Tools::MeshTool::new_default(), new_filter(), new_filter_blend_gaussian_blur(), new_filter_gaussian_blur(), Inkscape::UI::Dialog::new_font(), Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList::on_click_released(), Inkscape::UI::Dialog::ObjectsPanel::on_drag_drop(), Inkscape::Extension::Internal::OdfOutput::preprocess(), SPGradient::repr_write_vector(), Inkscape::UI::ShapeEditor::reset_item(), Inkscape::ObjectSet::set(), Inkscape::UI::Dialog::XmlTree::set_dt_select(), Inkscape::ObjectSet::setClipGroup(), Inkscape::ObjectSet::setMask(), Inkscape::ObjectSet::setReprList(), SPObject::setTitleOrDesc(), sp_copy_resource(), sp_document_default_gradient_vector(), sp_gradient_add_stop(), sp_gradient_fork_vector_if_necessary(), sp_gradient_get_private_normalized(), sp_gradient_load_from_svg(), sp_import_document(), sp_item_group_ungroup(), sp_lpe_item_cleanup_original_path_recursive(), sp_marker_fork_if_necessary(), sp_marker_load_from_svg(), sp_selected_path_create_offset_object(), sp_selected_path_do_offset(), Inkscape::UI::Tools::sp_spray_recursive(), sp_tref_convert_to_tspan(), Inkscape::UI::Tools::sp_tweak_dilate_recursive(), sp_vector_add_stop(), Inkscape::UI::Dialog::XmlTree::stopNodeEditing(), Inkscape::ObjectSet::strokesToPaths(), text_categorize_refs(), text_flow_into_shape(), text_put_on_path(), text_unflow(), Inkscape::ObjectSet::tile(), SPUse::unlink(), and Inkscape::Extension::Internal::OdfOutput::writeTree().

◆ getObjectsByClass()

std::vector< SPObject * > SPDocument::getObjectsByClass ( Glib::ustring const &  klass) const

Definition at line 1229 of file document.cpp.

References _getObjectsByClassRecursive(), and root.

Referenced by select_by_class().

◆ getObjectsByElement()

std::vector< SPObject * > SPDocument::getObjectsByElement ( Glib::ustring const &  element,
bool  custom = false 
) const

Definition at line 1256 of file document.cpp.

References _getObjectsByElementRecursive(), custom, and root.

Referenced by select_by_element(), and sp_file_fix_lpe().

◆ getObjectsBySelector()

◆ getOriginalDocument()

const SPDocument * SPDocument::getOriginalDocument ( ) const
inline

Definition at line 138 of file document.h.

References _original_document.

Referenced by add_actions_processing().

◆ getPageManager() [1/2]

Inkscape::PageManager & SPDocument::getPageManager ( )
inline

Definition at line 164 of file document.h.

References _page_manager.

Referenced by Inkscape::Selection::_emitChanged(), Inkscape::Selection::_emitModified(), Inkscape::UI::Dialog::GuidelinePropertiesDialog::_modeChanged(), Inkscape::UI::Dialog::GuidelinePropertiesDialog::_onOKimpl(), Inkscape::UI::Toolbar::SelectToolbar::any_value_changed(), Inkscape::UI::Toolbar::PageToolbar::bleedsEdited(), SPGrid::build(), SPNamedView::build(), Inkscape::UI::Dialog::DocumentProperties::build_page(), canvas_transform(), SPNamedView::child_added(), Inkscape::UI::Tools::PagesTool::connectDocument(), Inkscape::UI::Toolbar::NodeToolbar::coord_changed(), Inkscape::PageManager::disablePages(), InkFileExportCmd::do_export_png(), InkFileExportCmd::do_export_vector(), Inkscape::LivePathEffect::LPEMirrorSymmetry::doBeforeEffect(), Inkscape::UI::Dialog::Print::draw_page(), Inkscape::PageManager::enablePages(), Inkscape::UI::Dialog::Export::exportVector(), Inkscape::UI::Dialog::Export::exportVector(), file_import_pages(), SPGrid::getEffectiveOriginAndSpacing(), SPPage::getPageIndex(), SPNamedView::hide(), Inkscape::UI::Toolbar::PageToolbar::labelEdited(), Inkscape::UI::Toolbar::SelectToolbar::layout_widget_update(), Inkscape::UI::Tools::PagesTool::marginKnotMoved(), Inkscape::UI::Toolbar::PageToolbar::marginsEdited(), Inkscape::UI::Toolbar::PageToolbar::marginSideEdited(), SPNamedView::modified(), Inkscape::PageManager::newPage(), Inkscape::UI::Widget::PageSelector::nextPage(), Inkscape::UI::Dialog::SingleExport::onExport(), Inkscape::UI::Dialog::SingleExport::onPagesChanged(), SPNamedView::order_changed(), page_backward(), page_delete(), page_fit_to_selection(), page_forward(), page_new(), page_rotate(), Inkscape::UI::Dialog::BatchExport::pagesChanged(), Inkscape::UI::Toolbar::PageToolbar::pagesChanged(), Inkscape::UI::Widget::PageSelector::pagesChanged(), Inkscape::UI::Tools::PagesTool::PagesTool(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), Inkscape::UI::Widget::PageSelector::prevPage(), Inkscape::UI::Dialog::Print::Print(), Inkscape::UI::Dialog::SingleExport::refreshArea(), Inkscape::UI::Dialog::BatchExport::refreshItems(), Inkscape::UI::Dialog::SingleExport::refreshPage(), SPNamedView::remove_child(), Inkscape::Extension::Internal::CairoRenderer::renderPages(), Inkscape::Extension::Internal::TemplateBase::resize_to_template(), Inkscape::UI::Tools::PagesTool::resizeKnotFinished(), Inkscape::UI::Tools::PagesTool::resizeKnotMoved(), Inkscape::UI::Tools::DropperTool::root_handler(), Inkscape::UI::Tools::PagesTool::root_handler(), Inkscape::UI::Toolbar::PageToolbar::selectionChanged(), Inkscape::UI::Widget::PageSelector::selectonChanged(), SPNamedView::set(), Inkscape::UI::Dialog::DocumentProperties::set_content_scale(), SPNamedView::set_desk_color(), SPPage::setDefaultAttributes(), Inkscape::UI::Dialog::BatchExport::setDefaultSelectionMode(), Inkscape::UI::Toolbar::PageToolbar::setDesktop(), Inkscape::UI::Dialog::BatchExport::setDocument(), Inkscape::UI::Dialog::SingleExport::setDocument(), Inkscape::UI::Widget::PageSelector::setDocument(), SPPage::setPageIndex(), Inkscape::UI::Widget::PageSelector::setSelectedPage(), Inkscape::UI::Toolbar::PageToolbar::setSizeText(), Inkscape::UI::Dialog::Print::setup_page(), SPNamedView::show(), Inkscape::UI::Tools::MeasureTool::showInfoBox(), Inkscape::UI::Toolbar::PageToolbar::sizeChanged(), Inkscape::UI::Toolbar::PageToolbar::sizeChoose(), sp_guide_create_guides_around_page(), Inkscape::UI::Dialog::sp_icon_doc_icon(), sp_import_document(), SPNamedView::temporarily_show_guides(), SPPage::update(), Inkscape::UI::Dialog::DocumentProperties::update_widgets(), Inkscape::UI::Widget::CanvasGrid::updateRulers(), SPNamedView::updateViewPort(), and Inkscape::UI::Toolbar::NodeToolbar::value_changed().

◆ getPageManager() [2/2]

const Inkscape::PageManager & SPDocument::getPageManager ( ) const
inline

Definition at line 165 of file document.h.

References _page_manager.

◆ getParent() [1/2]

SPDocument * SPDocument::getParent ( )
inline

Definition at line 219 of file document.h.

References _parent_document.

Referenced by SPStyle::_mergeObjectStylesheet().

◆ getParent() [2/2]

SPDocument const * SPDocument::getParent ( ) const
inline

Definition at line 220 of file document.h.

References _parent_document.

◆ getPerspectivesInDefs()

void SPDocument::getPerspectivesInDefs ( std::vector< Persp3D * > &  list) const

Definition at line 273 of file document.cpp.

References c, SPObject::children, SPRoot::defs, and root.

Referenced by getCurrentPersp3D(), and numPerspectivesInDefs().

◆ getReprDoc() [1/2]

Inkscape::XML::Document * SPDocument::getReprDoc ( )
inline

Our Inkscape::XML::Document.

Definition at line 213 of file document.h.

References rdoc.

Referenced by SPPattern::_chain(), SPGrid::_checkOldGrid(), Inkscape::UI::Widget::CanvasGrid::_createGuide(), Inkscape::UI::Tools::EraserTool::_doWork(), Inkscape::UI::Tools::ConnectorTool::_flushWhite(), _importDefsNode(), Inkscape::UI::Tools::TextTool::_setupText(), Inkscape::LivePathEffect::LPEPowerClip::add(), add_actions_processing(), Inkscape::UI::Dialog::DocumentProperties::addEmbeddedScript(), Inkscape::UI::Dialog::DocumentProperties::addExternalScript(), Inkscape::UI::Tools::PencilTool::addPowerStrokePencil(), Inkscape::ObjectSet::clone(), SPHatch::clone_if_necessary(), Inkscape::LivePathEffect::LPECopyRotate::cloneD(), Inkscape::LivePathEffect::LPEMirrorSymmetry::cloneD(), Inkscape::LivePathEffect::LPETiling::cloneD(), Inkscape::ObjectSet::cloneOriginalPathLPE(), Inkscape::UI::Dialog::XmlTree::cmd_new_element_node(), Inkscape::UI::Dialog::XmlTree::cmd_new_text_node(), SPBox3D::convert_to_group(), Box3DSide::convert_to_path(), SPClipPath::create(), SPMask::create(), create_flowtext_with_internal_frame(), Inkscape::create_layer(), SPGrid::create_new(), SPFont::create_new_glyph(), Inkscape::UI::Dialog::create_path_from_glyph(), create_text_with_inline_size(), create_text_with_rectangle(), Persp3D::create_xml_element(), Inkscape::LivePathEffect::Effect::createAndApply(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::ObjectSet::createBitmapCopy(), Box3DSide::createBox3DSide(), Inkscape::ColorProfile::createFromProfile(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPECopyRotate::createPathBase(), Inkscape::LivePathEffect::LPEMirrorSymmetry::createPathBase(), Inkscape::LivePathEffect::LPESlice::createPathBase(), Inkscape::LivePathEffect::LPETiling::createPathBase(), SPGuide::createSPGuide(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), Inkscape::UI::Tools::do_trace(), Inkscape::LivePathEffect::LPEBool::doBeforeEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doOnApply(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::LivePathEffect::LPEBool::dupleNode(), Inkscape::ObjectSet::duplicate(), Inkscape::UI::Dialog::DocumentProperties::editEmbeddedScript(), Inkscape::Extension::Internal::BlurEdge::effect(), Inkscape::Extension::Internal::Filter::Filter::effect(), Inkscape::Extension::Internal::Grid::effect(), Inkscape::Extension::Internal::Grid::effect(), file_import(), file_import_pages(), Inkscape::ObjectSet::fillBetweenMany(), filter_add_primitive(), LivePathEffectObject::fork_private_if_necessary(), generate_linked_fill(), generate_marker(), SPFlowtext::getAsText(), Inkscape::ObjectSet::group(), item_to_paths(), modify_filter_gaussian_blur_from_item(), Inkscape::UI::Tools::MeshTool::new_default(), new_filter(), new_filter_blend_gaussian_blur(), new_filter_gaussian_blur(), Inkscape::UI::Dialog::new_font(), Inkscape::PageManager::newPage(), Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList::on_click_released(), SPPattern::produce(), rebase(), recursively_apply_style(), SPGradient::repr_write_vector(), Inkscape::Extension::Internal::Svg::save(), Inkscape::ObjectSet::setClipGroup(), Inkscape::UI::Tools::MeasureTool::setGuide(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::UI::Tools::MeasureTool::setMarker(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::ObjectSet::setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), SPObject::setTitleOrDesc(), sp_copy_resource(), sp_document_default_gradient_vector(), sp_gradient_fork_private_if_necessary(), sp_gradient_fork_vector_if_necessary(), sp_gradient_get_private_normalized(), sp_gradient_load_from_svg(), sp_import_document(), sp_lpe_item_cleanup_original_path_recursive(), sp_marker_fork_if_necessary(), sp_marker_load_from_svg(), sp_selected_path_create_offset_object(), sp_selected_path_do_offset(), sp_selection_paste_impl(), Inkscape::UI::Tools::sp_spray_recursive(), sp_te_insert_line(), sp_tref_convert_to_tspan(), sp_tref_update_text(), Inkscape::UI::Tools::sp_tweak_dilate_recursive(), Inkscape::UI::Tools::spdc_create_single_dot(), Inkscape::UI::Tools::spdc_flush_white(), split_text_object_tree_at(), Inkscape::UI::Dialog::XmlTree::stopNodeEditing(), Inkscape::Extension::Internal::SvgBuilder::SvgBuilder(), text_flow_into_shape(), text_put_on_path(), text_to_glyphs(), text_unflow(), Inkscape::ObjectSet::tile(), Inkscape::UI::Tools::MeasureTool::toItem(), Inkscape::ObjectSet::toMarker(), Inkscape::ObjectSet::toNextLayer(), Inkscape::ObjectSet::toPrevLayer(), Inkscape::ObjectSet::toSymbol(), Inkscape::LivePathEffect::LPEPowerMask::tryForkMask(), Inkscape::UI::Toolbar::TextToolbar::unindent_node(), SPUse::unlink(), Inkscape::ObjectSet::unsetMask(), SPSymbol::unSymbol(), Inkscape::ObjectSet::untile(), and SPRect::update_patheffect().

◆ getReprDoc() [2/2]

Inkscape::XML::Document const * SPDocument::getReprDoc ( ) const
inline

Definition at line 214 of file document.h.

References rdoc.

◆ getReprNamedView()

◆ getReprRoot()

◆ getResourceList()

◆ getRoot() [1/2]

SPRoot * SPDocument::getRoot ( )
inline

Returns our SPRoot.

Definition at line 202 of file document.h.

References root.

Referenced by SPDesktop::_attachDocument(), Inkscape::UI::Widget::CanvasGrid::_createGuide(), SPDesktop::_detachDocument(), Inkscape::UI::Dialog::LayerPropertiesDialog::_doCreate(), Inkscape::LayerManager::_setDocument(), Inkscape::UI::Dialog::LayerPropertiesDialog::_setup_layers_controls(), Inkscape::UI::Dialog::LayerPropertiesDialog::_setup_position_controls(), add_actions_processing(), Inkscape::FontLister::add_document_fonts_at_top(), Inkscape::UI::Dialog::CloneTiler::apply(), SPLPEItem::applyToClipPathOrMask(), Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), change_def_references(), SPMeshNodeArray::color_pick(), Inkscape::UI::Dialog::PreviewDrawing::construct(), Inkscape::convert_text_to_curves(), Persp3D::create_xml_element(), Inkscape::ObjectSet::createBitmapCopy(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), SPGuide::createSPGuide(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), Inkscape::UI::Dialog::PreviewDrawing::destruct(), InkFileExportCmd::do_export_png(), Inkscape::LivePathEffect::LPEFillBetweenMany::doBeforeEffect(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::doBeforeEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doBeforeEffect(), Inkscape::UI::Dialog::DocumentProperties::documentReplaced(), Inkscape::UI::Dialog::IconPreviewPanel::documentReplaced(), Inkscape::UI::Dialog::Prototype::documentReplaced(), Inkscape::LivePathEffect::LPEFillBetweenMany::doOnOpen(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::doOnOpen(), Inkscape::Extension::Internal::PovOutput::doTree(), Inkscape::UI::Dialog::Export::exportVector(), file_import(), file_save(), fit_canvas_to_drawing(), Inkscape::PageManager::fitToSelection(), Inkscape::UI::Dialog::get_document_scale_helper(), Inkscape::UI::Dialog::BatchExport::getBatchName(), SPItem::getCenter(), Inkscape::Extension::Internal::getODFItemTransform(), Inkscape::UI::Dialog::BatchExport::getPreviousBatchPath(), hide_lock_unhide_all(), hide_lock_unlock_all(), Inkscape::Extension::Internal::latex_render_document_text_to_file(), legacy_transform_backward(), legacy_transform_forward(), Inkscape::UI::Dialog::SingleExport::loadExportHints(), SPGuide::moveto(), objects_in_document(), Inkscape::UI::Widget::RegisteredScalarUnit::on_value_changed(), Inkscape::UI::Dialog::Find::onAction(), Inkscape::UI::Dialog::SingleExport::onExport(), Inkscape::UI::Dialog::SpellCheck::onStart(), Inkscape::Extension::Internal::pdf_render_document_to_file(), prevent_id_clashes(), Inkscape::Extension::Internal::Emf::print_document_to_file(), Inkscape::Extension::Internal::Wmf::print_document_to_file(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), Inkscape::Extension::Internal::ps_print_document_to_file(), query_all(), query_dimension(), SPStyleElem::read_content(), Inkscape::UI::Dialog::SingleExport::refreshArea(), Inkscape::UI::Dialog::IconPreviewPanel::refreshPreview(), Inkscape::UI::Dialog::IconPreviewPanel::removeDrawing(), rename_id(), Inkscape::UI::Dialog::PreviewDrawing::render(), Inkscape::Extension::Internal::CairoRenderer::renderPage(), Inkscape::Extension::Internal::CairoRenderer::renderPages(), Inkscape::Extension::Implementation::Script::resize_to_template(), Inkscape::PageManager::rotatePage(), Inkscape::Extension::Internal::LatexOutput::save(), scaleContentBy(), select_all(), select_invert(), SPGuide::set(), Inkscape::UI::Dialog::set_document_dimensions(), Inkscape::UI::Dialog::set_document_scale_helper(), Box3DSide::set_shape(), Inkscape::UI::Dialog::BatchExport::setBatchName(), Inkscape::UI::Dialog::BatchExport::setBatchPath(), SPItem::setCenter(), Inkscape::UI::View::SVGViewWidget::setDocument(), Inkscape::UI::Tools::MeasureTool::setGuide(), Inkscape::UI::Dialog::ObjectsPanel::setRootWatcher(), Inkscape::Display::TranslucencyGroup::setSolidItem(), Inkscape::Extension::Internal::CairoRenderer::setupDocument(), Inkscape::Extension::Internal::LaTeXTextRenderer::setupDocument(), Inkscape::Extension::Internal::Metafile::setViewBoxIfMissing(), sp_document_metadata(), sp_export_png_file(), sp_file_convert_dpi(), sp_file_convert_font_name(), sp_file_convert_text_baseline_spacing(), sp_file_fix_empty_lines(), sp_file_save_dialog(), sp_generate_internal_bitmap(), sp_get_all_document_items(), sp_item_group_ungroup(), sp_namedview_update_layers_from_document(), sp_print_document(), sp_print_document_to_file(), Inkscape::UI::Dialog::CloneTiler::trace_finish(), Inkscape::UI::Dialog::CloneTiler::trace_setup(), Inkscape::LivePathEffect::LPEFillBetweenMany::transform_multiply_nested(), Inkscape::LivePathEffect::LPEFillBetweenStrokes::transform_multiply_nested(), Inkscape::UI::Widget::EntityLineEntry::update(), Inkscape::UI::Widget::EntityMultiLineEntry::update(), Inkscape::FontLister::update_font_list(), update_lpobjs(), SPGroup::update_patheffect(), SPShape::update_patheffect(), Inkscape::UI::Dialog::DocumentProperties::update_viewbox(), Inkscape::UI::Dialog::DocumentProperties::update_widgets(), and SPDesktop::zoom_drawing().

◆ getRoot() [2/2]

SPRoot const * SPDocument::getRoot ( ) const
inline

Definition at line 203 of file document.h.

References root.

◆ getRouter()

◆ getSelection()

Inkscape::Selection * SPDocument::getSelection ( )
inline

Definition at line 222 of file document.h.

References _selection.

Referenced by InkscapeApplication::process_document().

◆ getStyleCascade()

CRCascade * SPDocument::getStyleCascade ( )
inline

◆ getViewBox()

◆ getVirgin()

bool SPDocument::getVirgin ( )
inline

Definition at line 137 of file document.h.

References virgin.

Referenced by InkscapeApplication::create_window(), and window_open().

◆ getWidth()

◆ getXMLDialogSelectedObject()

SPObject * SPDocument::getXMLDialogSelectedObject ( )
inline

◆ has_yaxis_orientation_changed()

bool SPDocument::has_yaxis_orientation_changed ( )
private

Detect Y-axis orientation change.

Returns
true if change has been detected

Definition at line 1420 of file document.cpp.

References getNamedView(), SPNamedView::is_y_axis_down(), is_yaxisdown(), and root.

Referenced by _updateDocument().

◆ idle_handler()

bool SPDocument::idle_handler ( )

An idle handler to update the document.

Returns true if the document needs further updates.

Definition at line 1536 of file document.cpp.

References _updateDocument(), and modified_connection.

Referenced by requestModified().

◆ importDefs()

void SPDocument::importDefs ( SPDocument source)

Paste SVG defs from the document retrieved from the clipboard or imported document into the active document.

Parameters
clipdocThe document to paste.
Precondition
clipdoc != NULL and pasting into the active document is possible.

Definition at line 2027 of file document.cpp.

References _importDefsNode(), getDefs(), SPObject::getRepr(), getReprRoot(), prevent_id_clashes(), root, and sp_repr_lookup_name_many().

Referenced by file_import(), and sp_import_document().

◆ is_yaxisdown()

◆ isModifiedSinceAutoSave()

bool SPDocument::isModifiedSinceAutoSave ( ) const
inline

Definition at line 141 of file document.h.

References modified_since_autosave.

◆ isModifiedSinceSave()

bool SPDocument::isModifiedSinceSave ( ) const
inline

◆ isPartial()

bool SPDocument::isPartial ( ) const
inline

Definition at line 362 of file document.h.

References partial.

◆ isSeeking()

◆ isSensitive()

◆ numPerspectivesInDefs()

unsigned int SPDocument::numPerspectivesInDefs ( ) const
inline

Definition at line 352 of file document.h.

References getPerspectivesInDefs().

◆ operator=()

SPDocument & SPDocument::operator= ( SPDocument const &  )
delete

◆ pageBounds()

Geom::OptRect SPDocument::pageBounds ( )

Returns the position of the selected page or the preferredBounds()

Definition at line 986 of file document.cpp.

References _page_manager, page, and preferredBounds().

◆ preferredBounds()

◆ process_pending_resource_changes()

void SPDocument::process_pending_resource_changes ( )

Definition at line 1930 of file document.cpp.

References pending_resource_changes, and resources_changed_signals.

Referenced by SPObject::invoke_build().

◆ prunePages()

void SPDocument::prunePages ( const std::string &  page_nums,
bool  invert = false 
)

Remove pages in bulk using the integer range format "1,2,3-4" etc.

Parameters
page_nums- A string containing a range of page numbers
invert- Keep the pages and remove the rest.

Definition at line 310 of file document.cpp.

References _page_manager, ensureUpToDate(), invert(), and page.

◆ queueForOrphanCollection()

void SPDocument::queueForOrphanCollection ( SPObject object)

Definition at line 321 of file document.cpp.

References _collection_queue, SPObject::document, and sp_object_ref().

Referenced by SPObject::requestOrphanCollection().

◆ rebase() [1/3]

void SPDocument::rebase ( bool  keep_namedview = true)

Definition at line 606 of file document.cpp.

References document_filename, and rebase().

◆ rebase() [2/3]

void SPDocument::rebase ( const gchar *  file,
bool  keep_namedview = true 
)

Definition at line 536 of file document.cpp.

References rebase(), and sp_repr_read_file().

◆ rebase() [3/3]

◆ removeResource()

◆ removeUndoObserver()

◆ requestModified()

◆ rerouting_handler()

bool SPDocument::rerouting_handler ( )

An idle handler to reroute connectors in the document.

Definition at line 1549 of file document.cpp.

References _router.

Referenced by requestModified().

◆ reset_key()

void SPDocument::reset_key ( void *  dummy)
inline

Definition at line 363 of file document.h.

References actionkey.

◆ scaleContentBy()

void SPDocument::scaleContentBy ( Geom::Scale const &  delta)

Scale the content, used by file-update and document properties when modifying the the document's viewBox while retaining the content's physical size.

Definition at line 795 of file document.cpp.

References delta, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), getRoot(), SPGroup::scaleChildItemsRec(), and Inkscape::Preferences::setBool().

Referenced by Inkscape::UI::Dialog::DocumentProperties::set_content_scale().

◆ serial()

unsigned long SPDocument::serial ( ) const
inline

Definition at line 360 of file document.h.

References _serial.

◆ set_origin_follows_page()

void SPDocument::set_origin_follows_page ( bool  on)

Definition at line 2348 of file document.cpp.

References getNamedView(), and SPNamedView::set_origin_follows_page().

◆ set_reference_document()

void SPDocument::set_reference_document ( SPDocument document)

Set the reference document object.

Use this function to extend functionality of getObjectById() - it will search in reference document. This is useful when rendering objects that have been copied from this document into a sandbox document. Setting reference will allow sandbox document to find gradients, or linked objects that may have been referenced by copied object.

Parameters
document

Definition at line 2322 of file document.cpp.

References _ref_document.

Referenced by SPDocument::install_reference_document::install_reference_document().

◆ setCurrentPersp3D()

◆ setCurrentPersp3DImpl()

void SPDocument::setCurrentPersp3DImpl ( Persp3DImpl *const  persp_impl)
inline

Definition at line 348 of file document.h.

References current_persp3d_impl.

◆ setDocumentBase()

void SPDocument::setDocumentBase ( char const *  document_base)

To be used for resolving relative hrefs.

Definition at line 1050 of file document.cpp.

References document_base.

◆ setDocumentFilename()

void SPDocument::setDocumentFilename ( char const *  filename)

A filename, or NULL.

Sets base, name and filename members of document.

Doesn't update any relative hrefs in the document: thus, this is primarily for newly-created documents.

See also
SPDocument::changeFilenameAndHrefs

Definition at line 1119 of file document.cpp.

References do_change_filename().

◆ setDocumentScale() [1/2]

void SPDocument::setDocumentScale ( const double  scale)

Sets document scale (by changing viewBox, x and y scaling equal)

Definition at line 767 of file document.cpp.

References scale, and setDocumentScale().

◆ setDocumentScale() [2/2]

void SPDocument::setDocumentScale ( const double  scaleX,
const double  scaleY 
)

◆ setHeight()

◆ setModifiedSinceAutoSaveFalse()

void SPDocument::setModifiedSinceAutoSaveFalse ( )
inline

Definition at line 143 of file document.h.

References modified_since_autosave.

◆ setModifiedSinceSave()

void SPDocument::setModifiedSinceSave ( bool const  modified = true)

◆ setPages()

void SPDocument::setPages ( bool  enabled)

void SPDocument::initialize_current_persp3d() { this->current_persp3d = Persp3D::document_first_persp(this); if (!this->current_persp3d) { this->current_persp3d = Persp3D::create_xml_element(this); } }

Enables or disables document pages, usually used in import code.

Definition at line 295 of file document.cpp.

References _page_manager.

◆ setupViewport()

◆ setViewBox() [1/2]

◆ setViewBox() [2/2]

void SPDocument::setViewBox ( const Geom::Rect viewBox)

Definition at line 966 of file document.cpp.

References root, SPObject::updateRepr(), SPViewBox::viewBox, and SPViewBox::viewBox_set.

◆ setVirgin()

void SPDocument::setVirgin ( bool  Virgin)
inline

Definition at line 136 of file document.h.

References virgin.

Referenced by InkscapeApplication::document_revert().

◆ setWidth()

◆ setWidthAndHeight()

◆ setXMLDialogSelectedObject()

◆ update_desktop_affine()

double SPDocument::update_desktop_affine ( )
private

Update desktop transform after Y-axis orientation change.

Returns
shift to apply to display to keep content from scrolling

Definition at line 1431 of file document.cpp.

References _doc2dt, SVGLength::computed, getNamedView(), SPDimensions::height, root, and shift().

Referenced by _updateDocument().

◆ update_lpobjs()

void SPDocument::update_lpobjs ( )

◆ vacuumDocument()

unsigned int SPDocument::vacuumDocument ( )

Remove unused definitions etc.

recursively from an entire document.

Returns
Number of removed objects

Definition at line 1987 of file document.cpp.

References collectOrphans(), end, objects_in_document(), root, start, and vacuum_document_recursive().

Referenced by add_actions_processing(), Inkscape::UI::Dialog::Export::exportVector(), and sp_file_vacuum().

◆ yaxisdir()

double SPDocument::yaxisdir ( ) const
inline

"1" if the desktop Y-axis points down, "-1" if it points up.

Definition at line 278 of file document.h.

References _doc2dt.

Referenced by fitToRect(), is_yaxisdown(), SPItem::set(), and SPItem::write().

Member Data Documentation

◆ _activexmltree

SPObject* SPDocument::_activexmltree
private

Definition at line 172 of file document.h.

Referenced by getXMLDialogSelectedObject(), and setXMLDialogSelectedObject().

◆ _child_documents

std::vector<std::unique_ptr<SPDocument> > SPDocument::_child_documents
private

Definition at line 398 of file document.h.

Referenced by _searchForChild(), and createChildDoc().

◆ _cms_manager

std::unique_ptr<Inkscape::Colors::DocumentCMS> SPDocument::_cms_manager
private

Definition at line 175 of file document.h.

Referenced by getDocumentCMS(), getDocumentCMS(), and SPDocument().

◆ _collection_queue

std::vector<SPObject *> SPDocument::_collection_queue
private

Orphans.

Definition at line 452 of file document.h.

Referenced by collectOrphans(), and queueForOrphanCollection().

◆ _desktop_activated_connection

sigc::connection SPDocument::_desktop_activated_connection
private

Definition at line 482 of file document.h.

Referenced by SPDocument(), and ~SPDocument().

◆ _doc2dt

Geom::Affine SPDocument::_doc2dt
mutableprivate

Definition at line 410 of file document.h.

Referenced by doc2dt(), update_desktop_affine(), and yaxisdir().

◆ _event_log

std::unique_ptr<Inkscape::EventLog> SPDocument::_event_log
private

Definition at line 430 of file document.h.

Referenced by get_event_log(), and SPDocument().

◆ _node_cache

std::map<unsigned long, std::deque<SPItem*> > SPDocument::_node_cache
mutableprivate

Definition at line 422 of file document.h.

Referenced by clearNodeCache(), and get_flat_item_list().

◆ _original_document

SPDocument const* SPDocument::_original_document = nullptr
private

Definition at line 402 of file document.h.

Referenced by getOriginalDocument().

◆ _page_manager

std::unique_ptr<Inkscape::PageManager> SPDocument::_page_manager
private

◆ _parent_document

SPDocument* SPDocument::_parent_document = nullptr
private

Definition at line 400 of file document.h.

Referenced by getLanguages(), getObjectById(), getObjectById(), getParent(), and getParent().

◆ _reconstruction_finish_signal

SPDocument::ReconstructionFinish SPDocument::_reconstruction_finish_signal
private

Definition at line 478 of file document.h.

Referenced by connectReconstructionFinish(), and emitReconstructionFinish().

◆ _reconstruction_start_signal

SPDocument::ReconstructionStart SPDocument::_reconstruction_start_signal
private

Definition at line 477 of file document.h.

Referenced by connectReconstructionStart(), and emitReconstructionStart().

◆ _ref_document

SPDocument* SPDocument::_ref_document = nullptr
private

◆ _router

std::unique_ptr<Avoid::Router> SPDocument::_router
private

Definition at line 379 of file document.h.

Referenced by ensureUpToDate(), getRouter(), rerouting_handler(), and SPDocument().

◆ _saved_or_modified_signal

sigc::signal<void ()> SPDocument::_saved_or_modified_signal
private

Definition at line 485 of file document.h.

Referenced by connectSavedOrModified(), and setModifiedSinceSave().

◆ _selection

std::unique_ptr<Inkscape::Selection> SPDocument::_selection
private

Definition at line 380 of file document.h.

Referenced by getSelection(), and SPDocument().

◆ _serial

unsigned long SPDocument::_serial
private

Definition at line 444 of file document.h.

Referenced by serial(), and SPDocument().

◆ _y_axis_flipped

sigc::signal<void (double)> SPDocument::_y_axis_flipped
private

Definition at line 486 of file document.h.

Referenced by _updateDocument(), and get_y_axis_flipped().

◆ action_expires

double SPDocument::action_expires
private

◆ action_group

Glib::RefPtr<Gio::SimpleActionGroup> SPDocument::action_group
private

Definition at line 455 of file document.h.

Referenced by getActionGroup(), and SPDocument().

◆ actionkey

◆ before_commit_signal

SPDocument::BeforeCommitSignal SPDocument::before_commit_signal
private

Definition at line 480 of file document.h.

Referenced by connectBeforeCommit(), and Inkscape::DocumentUndo::maybeDone().

◆ commit_signal

SPDocument::CommitSignal SPDocument::commit_signal
private

Definition at line 479 of file document.h.

Referenced by connectCommit(), and Inkscape::DocumentUndo::maybeDone().

◆ console_output_undo_observer

Inkscape::ConsoleOutputUndoObserver SPDocument::console_output_undo_observer
private

Definition at line 441 of file document.h.

Referenced by SPDocument().

◆ current_persp3d

Persp3D* SPDocument::current_persp3d
private

Currently 'active' perspective (to which, e.g., newly created boxes are attached)

Definition at line 425 of file document.h.

Referenced by getCurrentPersp3D(), and setCurrentPersp3D().

◆ current_persp3d_impl

Persp3DImpl* SPDocument::current_persp3d_impl
private

Definition at line 426 of file document.h.

Referenced by getCurrentPersp3DImpl(), setCurrentPersp3DImpl(), and ~SPDocument().

◆ destroySignal

sigc::signal<void ()> SPDocument::destroySignal
private

Definition at line 484 of file document.h.

Referenced by connectDestroy(), and ~SPDocument().

◆ document_base

char* SPDocument::document_base
private

To be used for resolving relative hrefs.

Definition at line 414 of file document.h.

Referenced by copy(), createChildDoc(), createDoc(), createNewDoc(), createNewDocFromMem(), do_change_filename(), getDocumentBase(), setDocumentBase(), and ~SPDocument().

◆ document_filename

char* SPDocument::document_filename
private

A filename, or NULL.

Definition at line 413 of file document.h.

Referenced by _searchForChild(), copy(), do_change_filename(), ensureUpToDate(), getDocumentFilename(), rebase(), and ~SPDocument().

◆ document_name

char* SPDocument::document_name
private

basename or other human-readable label for the document.

Definition at line 415 of file document.h.

Referenced by copy(), createDoc(), createNewDoc(), createNewDocFromMem(), do_change_filename(), getDocumentName(), and ~SPDocument().

◆ filename_set_signal

SPDocument::FilenameSetSignal SPDocument::filename_set_signal
private

Definition at line 476 of file document.h.

Referenced by connectFilenameSet(), and do_change_filename().

◆ id_changed_signals

IDChangedSignalMap SPDocument::id_changed_signals
private

Dictionary of signals for id changes.

Definition at line 473 of file document.h.

Referenced by bindObjectToId(), and connectIdChanged().

◆ iddef

std::map<std::string, SPObject *> SPDocument::iddef
private

Definition at line 418 of file document.h.

Referenced by bindObjectToId(), getObjectByHref(), getObjectById(), and getObjectById().

◆ keepalive

bool SPDocument::keepalive
private

false if temporary document (e.g. to generate a PNG for display in a dialog).

Definition at line 384 of file document.h.

Referenced by copy(), createDoc(), createNewDoc(), createNewDocFromMem(), and ~SPDocument().

◆ modified_connection

sigc::connection SPDocument::modified_connection
private

Definition at line 388 of file document.h.

Referenced by ensureUpToDate(), idle_handler(), requestModified(), and ~SPDocument().

◆ modified_signal

SPDocument::ModifiedSignal SPDocument::modified_signal
private

Definition at line 475 of file document.h.

Referenced by _emitModified(), and connectModified().

◆ modified_since_autosave

bool SPDocument::modified_since_autosave = false
private

◆ modified_since_save

bool SPDocument::modified_since_save = false
private

Definition at line 386 of file document.h.

Referenced by isModifiedSinceSave(), and setModifiedSinceSave().

◆ object_id_counter

unsigned long SPDocument::object_id_counter
private

Definition at line 448 of file document.h.

Referenced by generate_unique_id().

◆ partial

◆ pending_resource_changes

std::queue<GQuark> SPDocument::pending_resource_changes
private

Definition at line 177 of file document.h.

Referenced by addResource(), and process_pending_resource_changes().

◆ rdoc

◆ redo

std::deque<Inkscape::Event *> SPDocument::redo
private

◆ reprdef

std::map<Inkscape::XML::Node *, SPObject *> SPDocument::reprdef
private

Definition at line 419 of file document.h.

Referenced by bindObjectToRepr(), and getObjectByRepr().

◆ rerouting_connection

sigc::connection SPDocument::rerouting_connection
private

Definition at line 389 of file document.h.

Referenced by ensureUpToDate(), requestModified(), and ~SPDocument().

◆ resources

std::map<std::string, std::vector<SPObject *> > SPDocument::resources

Definition at line 509 of file document.h.

Referenced by addResource(), getResourceList(), removeResource(), and ~SPDocument().

◆ resources_changed_signals

◆ root

◆ rroot

Inkscape::XML::Node* SPDocument::rroot
private

Root element of Inkscape::XML::Document.

Definition at line 393 of file document.h.

Referenced by createDoc(), createNewDoc(), getNamedView(), getReprNamedView(), and getReprRoot().

◆ seeking

bool SPDocument::seeking
private

◆ sensitive

◆ style_cascade

CRCascade* SPDocument::style_cascade
private

Definition at line 407 of file document.h.

Referenced by getStyleCascade(), and ~SPDocument().

◆ undo

◆ undo_timer

Glib::Timer SPDocument::undo_timer
private

Definition at line 447 of file document.h.

Referenced by Inkscape::DocumentUndo::maybeDone().

◆ undoStackObservers

◆ update_in_progress

unsigned SPDocument::update_in_progress = 0

For sanity check in SPObject::requestDisplayUpdate.

Definition at line 106 of file document.h.

Referenced by SPObject::requestDisplayUpdate(), and SPObject::updateDisplay().

◆ virgin

bool SPDocument::virgin
private

Has the document never been touched?

Definition at line 385 of file document.h.

Referenced by getVirgin(), Inkscape::DocumentUndo::maybeDone(), and setVirgin().


The documentation for this class was generated from the following files: