Inkscape
Vector Graphics Editor
|
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 | |
SPDocument & | operator= (SPDocument const &)=delete |
SPDocument * | createChildDoc (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< SPDocument > | copy () 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 SPDocument * | getOriginalDocument () 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) |
SPObject * | getXMLDialogSelectedObject () |
Inkscape::EventLog * | get_event_log () |
Inkscape::PageManager & | getPageManager () |
const Inkscape::PageManager & | getPageManager () const |
Inkscape::Colors::DocumentCMS & | getDocumentCMS () |
const Inkscape::Colors::DocumentCMS & | getDocumentCMS () 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::Router * | getRouter () const |
SPRoot * | getRoot () |
Returns our SPRoot. | |
SPRoot const * | getRoot () const |
SPDefs * | getDefs () |
Return the main defs object for the document. | |
Inkscape::XML::Node * | getReprRoot () |
Inkscape::XML::Node * | getReprNamedView () |
SPNamedView * | getNamedView () |
Get the namedview for this document, creates it if it's not found. | |
Inkscape::XML::Document * | getReprDoc () |
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) | |
SPDocument * | getParent () |
SPDocument const * | getParent () const |
Inkscape::Selection * | getSelection () |
CRCascade * | getStyleCascade () |
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::Affine & | doc2dt () const |
Document to desktop coordinate transformation. | |
const Geom::Affine & | dt2doc () 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) |
SPObject * | getObjectById (std::string const &id) const |
SPObject * | getObjectById (char const *id) const |
SPObject * | getObjectByHref (std::string const &href) const |
SPObject * | getObjectByHref (char const *href) const |
void | bindObjectToRepr (Inkscape::XML::Node *repr, SPObject *object) |
SPObject * | getObjectByRepr (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. | |
SPDocument * | get_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. | |
SPItem * | getItemAtPoint (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 |
SPItem * | getGroupAtPoint (unsigned int key, Geom::Point const &p) const |
void | setCurrentPersp3D (Persp3D *const persp) |
Persp3D * | getCurrentPersp3D () |
void | update_lpobjs () |
void | setCurrentPersp3DImpl (Persp3DImpl *const persp_impl) |
Persp3DImpl * | getCurrentPersp3DImpl () |
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< SPDocument > | createDoc (Inkscape::XML::Document *rdoc, char const *filename, char const *base, char const *name, bool keepalive, SPDocument *parent=nullptr) |
static std::unique_ptr< SPDocument > | createNewDoc (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< SPDocument > | createNewDocFromMem (std::span< char const > buffer, bool keepalive, std::string const &filename="") |
static SPItem * | getItemFromListAtPointBottom (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::IDChangedSignal > | IDChangedSignalMap |
typedef std::map< GQuark, SPDocument::ResourcesChangedSignal > | ResourcesChangedSignalMap |
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. | |
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.
|
private |
Definition at line 467 of file document.h.
|
private |
Definition at line 466 of file document.h.
|
private |
Definition at line 462 of file document.h.
|
private |
Definition at line 459 of file document.h.
|
private |
Definition at line 469 of file document.h.
|
private |
Definition at line 461 of file document.h.
|
private |
Definition at line 465 of file document.h.
|
private |
Definition at line 464 of file document.h.
|
private |
Definition at line 463 of file document.h.
|
private |
Definition at line 460 of file document.h.
|
private |
Definition at line 470 of file document.h.
SPDocument::SPDocument | ( | ) |
Definition at line 106 of file document.cpp.
References _cms_manager, _desktop_activated_connection, _event_log, _page_manager, _router, _selection, _serial, action_group, Inkscape::CompositeUndoStackObserver::add(), add_actions_edit_document(), add_actions_pages(), add_actions_processing(), add_actions_undo_document(), add_document_actions_effect(), console_output_undo_observer, next_serial, partial, seeking, Avoid::segmentPenalty, sensitive, and undoStackObservers.
SPDocument::~SPDocument | ( | ) |
Definition at line 160 of file document.cpp.
References _desktop_activated_connection, collectOrphans(), cr_cascade_unref(), current_persp3d_impl, destroySignal, document_base, document_filename, document_name, inkscape_unref(), keepalive, modified_connection, partial, rdoc, Inkscape::GC::release(), SPObject::releaseReferences(), rerouting_connection, resources, root, sp_object_unref(), sp_repr_free_log(), and style_cascade.
|
delete |
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().
|
private |
Definition at line 2040 of file document.cpp.
References Inkscape::XML::Node::appendChild(), Inkscape::XML::Node::attribute(), change_def_references(), SPObject::children, Inkscape::XML::Node::duplicate(), Inkscape::XML::ELEMENT_NODE, Inkscape::XML::Node::firstChild(), getDefs(), SPObject::getId(), getObjectByRepr(), SPObject::getRepr(), getReprDoc(), Inkscape::XML::Node::next(), Inkscape::GC::release(), and SPObject::setAttribute().
Referenced by importDefs().
|
private |
Definition at line 640 of file document.cpp.
References _child_documents, c, and document_filename.
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().
|
inline |
Definition at line 364 of file document.h.
References actionkey.
Referenced by Inkscape::Selection::rotateAnchored().
bool SPDocument::addResource | ( | char const * | key, |
SPObject * | object | ||
) |
Definition at line 1864 of file document.cpp.
References SPObject::cloned, SPObject::getId(), key, pending_resource_changes, resources, resources_changed_signals, and result.
Referenced by Inkscape::ColorProfile::build(), SPFeFuncNode::build(), SPFeComponentTransfer::build(), SPFeDistantLight::build(), SPFePointLight::build(), SPFeSpotLight::build(), SPClipPath::build(), SPFilter::build(), SPFont::build(), SPGrid::build(), SPGuide::build(), SPHatch::build(), SPMask::build(), SPPage::build(), SPPattern::build(), SPScript::build(), SPGradient::build(), SPImage::build(), SPSymbol::build(), and SPGroup::setLayerMode().
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.
observer |
Definition at line 2226 of file document.cpp.
References Inkscape::CompositeUndoStackObserver::add(), and undoStackObservers.
Referenced by Inkscape::Extension::Implementation::Script::PreviewObserver::connect().
void SPDocument::bindObjectToId | ( | char const * | id, |
SPObject * | object | ||
) |
Definition at line 1133 of file document.cpp.
References SPObject::getId(), id_changed_signals, and iddef.
Referenced by SPObject::invoke_build(), SPObject::releaseReferences(), and SPObject::set().
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().
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().
|
inline |
Definition at line 191 of file document.h.
References _node_cache.
Referenced by _emitModified(), bindObjectToRepr(), and Inkscape::LayerManager::setCurrentLayer().
void SPDocument::collectOrphans | ( | ) |
Definition at line 329 of file document.cpp.
References _collection_queue, and sp_object_unref().
Referenced by Inkscape::DocumentUndo::maybeDone(), vacuumDocument(), and ~SPDocument().
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().
sigc::connection SPDocument::connectCommit | ( | CommitSignal::slot_type | slot | ) |
Definition at line 2252 of file document.cpp.
References commit_signal.
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().
sigc::connection SPDocument::connectFilenameSet | ( | FilenameSetSignal::slot_type | slot | ) |
Definition at line 2247 of file document.cpp.
References filename_set_signal.
Referenced by SPDesktop::_attachDocument().
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().
sigc::connection SPDocument::connectModified | ( | ModifiedSignal::slot_type | slot | ) |
Definition at line 2242 of file document.cpp.
References modified_signal.
Referenced by Inkscape::UI::Tools::PagesTool::selectionChanged(), Inkscape::UI::Toolbar::PageToolbar::selectionChanged(), Inkscape::UI::Toolbar::GradientToolbar::setDesktop(), Inkscape::UI::Toolbar::MeshToolbar::setDesktop(), and Inkscape::UI::Widget::CanvasGrid::updateRulers().
sigc::connection SPDocument::connectReconstructionFinish | ( | ReconstructionFinish::slot_type | slot | ) |
Definition at line 2283 of file document.cpp.
References _reconstruction_finish_signal.
Referenced by SPDesktop::_attachDocument(), and Inkscape::Extension::Implementation::Script::PreviewObserver::connect().
sigc::connection SPDocument::connectReconstructionStart | ( | ReconstructionStart::slot_type | slot, |
bool | first = false |
||
) |
Definition at line 2275 of file document.cpp.
References _reconstruction_start_signal.
Referenced by SPDesktop::_attachDocument(), and Inkscape::Extension::Implementation::Script::PreviewObserver::connect().
sigc::connection SPDocument::connectResourcesChanged | ( | char const * | key, |
SPDocument::ResourcesChangedSignal::slot_type | slot | ||
) |
Definition at line 2268 of file document.cpp.
References key, and resources_changed_signals.
Referenced by Inkscape::LayerManager::_setDocument(), Inkscape::Colors::DocumentCMS::DocumentCMS(), and Inkscape::UI::Dialog::FilterEffectsDialog::documentReplaced().
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().
std::unique_ptr< SPDocument > SPDocument::copy | ( | ) | const |
Create a copy of the document, useful for modifying during save & export.
Definition at line 508 of file document.cpp.
References Inkscape::XML::Node::appendChild(), child, createDoc(), document_base, document_filename, document_name, Inkscape::XML::Node::duplicate(), Inkscape::XML::Node::firstChild(), keepalive, rdoc, and Inkscape::GC::release().
Referenced by InkFileExportCmd::do_export_vector(), Inkscape::UI::Dialog::BatchExport::onExport(), Inkscape::UI::Dialog::SingleExport::onExport(), and Inkscape::Extension::Output::save().
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().
|
static |
Fix baseline spacing (pre-92 files)
Fix font names in legacy documents (pre-92 files)
Fix first line spacing in legacy documents (pre-1.0 files)
Fix OSB (pre-1.1 files)
Fix feComposite (pre-1.2 files)
Fix d missing on shapes (1.3.1 files)
Fix dpi (pre-92 files). With GUI fixed in Inkscape::Application::fix_document.
Definition at line 340 of file document.cpp.
References Inkscape::XML::Node::addChild(), Inkscape::XML::Document::createElement(), SPFactory::createObject(), document_base, Persp3D::document_first_persp(), document_name, NodeTraits::get_type_string(), inkscape_ref(), SPObject::invoke_build(), keepalive, parent, prepend_current_dir_if_relative(), rdf_set_defaults(), rdoc, Inkscape::GC::release(), Inkscape::XML::Node::removeAttribute(), Inkscape::XML::Node::root(), rroot, sp_file_convert_dpi(), sp_file_convert_font_name(), sp_file_convert_text_baseline_spacing(), sp_file_fix_empty_lines(), sp_file_fix_feComposite(), sp_file_fix_osb(), and sp_no_convert_text_baseline_spacing.
Referenced by copy(), createNewDoc(), createNewDocFromMem(), Inkscape::Extension::Implementation::Script::new_from_template(), and Inkscape::Extension::Implementation::XSLT::open().
|
static |
Fetches document from filename, or creates new, if NULL; public document appears in document list.
Definition at line 668 of file document.cpp.
References createDoc(), doc_count, doc_mem_count, document_base, document_name, keepalive, Inkscape::XML::Node::name(), parent, rdoc, Inkscape::XML::Node::root(), rroot, sp_repr_document_new(), and sp_repr_read_file().
Referenced by createChildDoc(), Inkscape::UI::Widget::MarkerComboBox::init_combo(), ink_file_new(), InkviewWindow::load_document(), load_paint_doc(), Inkscape::Extension::Internal::GdkpixbufInput::open(), Inkscape::Extension::Internal::PdfInput::open(), Inkscape::Extension::Internal::Svg::open(), InkviewWindow::preload_documents(), and StockPaintDocuments::StockPaintDocuments().
|
static |
Definition at line 718 of file document.cpp.
References createDoc(), doc_mem_count, document_base, document_name, keepalive, Inkscape::XML::Node::name(), rdoc, Inkscape::GC::release(), Inkscape::XML::Node::root(), and sp_repr_read_mem().
Referenced by Inkscape::Extension::Internal::RvngImportDialog::_setPreviewPage(), Inkscape::Pixbuf::create_from_buffer(), Inkscape::Pixbuf::create_from_data_uri(), ink_file_open(), Inkscape::Extension::Internal::Emf::open(), Inkscape::Extension::Internal::PdfInput::open(), Inkscape::Extension::Internal::Svg::open(), Inkscape::Extension::Internal::Wmf::open(), Inkscape::Extension::Internal::WpgInput::open(), Inkscape::Extension::Internal::GimpGrad::open(), and Inkscape::Extension::Internal::rvng_open().
void SPDocument::do_change_filename | ( | char const *const | filename, |
bool const | rebase | ||
) |
Definition at line 1061 of file document.cpp.
References doc_count, document_base, document_filename, document_name, filename_set_signal, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), getReprRoot(), prepend_current_dir_if_relative(), rebase(), Inkscape::XML::rebase_hrefs(), and Inkscape::XML::Node::setAttribute().
Referenced by changeFilenameAndHrefs(), and setDocumentFilename().
const Geom::Affine & SPDocument::doc2dt | ( | ) | const |
Document to desktop coordinate transformation.
Definition at line 935 of file document.cpp.
References _doc2dt, SVGLength::computed, SPDimensions::height, is_yaxisdown(), and root.
Referenced by Inkscape::UI::Dialog::GridArrangeTab::arrange(), SPItem::desktopVisualBounds(), SPDesktop::doc2dt(), dt2doc(), Inkscape::UI::Dialog::getAnchorPoint(), SPPage::getDesktopBleed(), SPPage::getDesktopMargin(), SPPage::getDesktopRect(), SPItem::i2dt_affine(), and Inkscape::ObjectSet::strokedBounds().
|
inline |
Desktop to document coordinate transformation.
Definition at line 270 of file document.h.
References doc2dt().
Referenced by SPDesktop::dt2doc(), getMarkerBounds(), Inkscape::PageManager::newDesktopPage(), Inkscape::UI::Dialog::SingleExport::refreshPreview(), SPItem::set_i2d_affine(), SPPage::setDesktopRect(), Inkscape::UI::Tools::sp_spray_transform_path(), sp_validate_marker(), Inkscape::ObjectSet::tile(), and Inkscape::ObjectSet::toMarker().
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().
void SPDocument::emitReconstructionStart | ( | ) |
Definition at line 2301 of file document.cpp.
References _reconstruction_start_signal.
Referenced by rebase().
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().
void SPDocument::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.
rect | fit document size to this, in document coordinates |
(unused) |
Definition at line 1001 of file document.cpp.
References _page_manager, SVGLength::computed, getNamedView(), Geom::GenericRect< C >::height(), SPDimensions::height, is_yaxisdown(), Geom::GenericRect< C >::max(), Geom::GenericRect< C >::min(), SVGLength::PERCENT, root, setWidthAndHeight(), SPGroup::translateChildItems(), SVGLength::unit, Geom::GenericRect< C >::width(), Geom::X, Geom::Y, and yaxisdir().
Referenced by Inkscape::PageManager::deletePage(), InkFileExportCmd::do_export_vector(), Inkscape::UI::Dialog::Export::exportVector(), fit_canvas_to_drawing(), Inkscape::ObjectSet::fitCanvas(), Inkscape::PageManager::fitToRect(), Inkscape::PageManager::removePage(), Inkscape::PageManager::resizePage(), Inkscape::UI::Dialog::set_document_dimensions(), and SPPage::swapPage().
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().
|
inline |
Definition at line 162 of file document.h.
References _event_log.
Referenced by Inkscape::UI::Dialog::UndoHistory::connectEventLog(), Inkscape::UI::Dialog::UndoHistory::documentReplaced(), file_save(), Inkscape::UI::Tools::InteractiveBooleansTool::InteractiveBooleansTool(), sp_namedview_update_layers_from_document(), and Inkscape::UI::Tools::InteractiveBooleansTool::~InteractiveBooleansTool().
|
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().
|
static |
Definition at line 218 of file document.cpp.
References doc_count.
Referenced by Inkscape::Extension::Implementation::Script::new_from_template().
bool SPDocument::get_origin_follows_page | ( | ) |
Definition at line 2340 of file document.cpp.
References getNamedView().
Referenced by Inkscape::UI::Dialog::GuidelinePropertiesDialog::_modeChanged(), Inkscape::UI::Dialog::GuidelinePropertiesDialog::_onOKimpl(), Inkscape::UI::Toolbar::NodeToolbar::coord_changed(), SPGrid::getEffectiveOriginAndSpacing(), Inkscape::UI::Toolbar::SelectToolbar::layout_widget_update(), Inkscape::UI::Tools::MeasureTool::showInfoBox(), and Inkscape::UI::Toolbar::NodeToolbar::value_changed().
SPDocument * SPDocument::get_reference_document | ( | ) |
Definition at line 2326 of file document.cpp.
References _ref_document.
Referenced by SPStyle::_mergeObjectStylesheet().
|
inline |
Definition at line 283 of file document.h.
References _y_axis_flipped.
Referenced by SPDesktop::_attachDocument().
|
inline |
Definition at line 373 of file document.h.
References action_group.
Referenced by activate_any_actions(), add_actions_edit_document(), add_actions_pages(), add_actions_processing(), add_actions_undo_document(), InkscapeWindow::add_document_actions(), add_document_actions_effect(), Inkscape::UI::Dialog::DocumentProperties::display_unit_change(), enable_undo_actions(), InkscapeWindow::InkscapeWindow(), SPNamedView::modified(), Inkscape::Extension::ProcessingAction::run(), set_move_objects(), Inkscape::PageManager::subset(), Inkscape::UI::Dialog::DialogWindow::update_dialogs(), SPNamedView::updateGrids(), and SPNamedView::updateGuides().
Persp3D * SPDocument::getCurrentPersp3D | ( | ) |
Definition at line 253 of file document.cpp.
References current_persp3d, Persp3D::document_first_persp(), and getPerspectivesInDefs().
Referenced by SPBox3D::write().
|
inline |
Definition at line 349 of file document.h.
References current_persp3d_impl.
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().
Geom::Point SPDocument::getDimensions | ( | ) | const |
Definition at line 973 of file document.cpp.
References getHeight(), and getWidth().
Referenced by InkFileExportCmd::do_export_png(), Inkscape::UI::Widget::Canvas::paint_widget(), preferredBounds(), SPFlowtext::print(), SPShape::print(), SPText::print(), Inkscape::Extension::Internal::CairoRenderer::setupDocument(), and Inkscape::Extension::Internal::LaTeXTextRenderer::setupDocument().
Inkscape::Util::Unit const * SPDocument::getDisplayUnit | ( | ) |
guaranteed not to return nullptr
Definition at line 741 of file document.cpp.
References getNamedView().
Referenced by Inkscape::UI::Toolbar::PageToolbar::_unit_to_size(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), Inkscape::LivePathEffect::LPETiling::doBeforeEffect(), Inkscape::LivePathEffect::LPEMeasureSegments::doBeforeEffect(), Inkscape::LivePathEffect::LPERuler::doEffect_pwd2(), SPPage::getBleedLabel(), SPPage::getMarginLabel(), Inkscape::PageManager::getSizeLabel(), Inkscape::Display::SnapIndicator::make_alignment_indicator(), Inkscape::Display::SnapIndicator::make_distribution_indicators(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), SPPage::setBleed(), SPPage::setMargin(), SPPage::setMarginSide(), SPGrid::setPrefValues(), setViewBox(), and SPRoot::update().
|
inline |
Definition at line 235 of file document.h.
References document_base.
Referenced by Inkscape::URIReference::attach(), SPImage::description(), file_import(), Inkscape::findBrokenLinks(), Inkscape::fixBrokenLinks(), Inkscape::Extension::Internal::OdfOutput::save(), Inkscape::Extension::Internal::Svg::save(), Inkscape::Extension::Implementation::XSLT::save(), sp_import_document(), SPFeImage::try_load_image(), and SPImage::update().
|
inline |
Definition at line 167 of file document.h.
References _cms_manager.
Referenced by Inkscape::Extension::Internal::SvgBuilder::_getColorProfile(), Inkscape::UI::Dialog::DocumentProperties::documentReplaced(), SPIColor::getCMS(), SPIPaint::getCMS(), Inkscape::UI::Dialog::DocumentProperties::linkSelectedProfile(), Inkscape::UI::Dialog::DocumentProperties::removeSelectedProfile(), SPImage::update(), and Inkscape::Colors::xml_to_paint().
|
inline |
Definition at line 168 of file document.h.
References _cms_manager.
|
inline |
Definition at line 231 of file document.h.
References document_filename.
Referenced by Inkscape::UI::Dialog::Export::absolutizePath(), Inkscape::UI::Dialog::add_stats(), Inkscape::ColorProfile::createFromProfile(), Inkscape::UI::Dialog::Export::defaultFilename(), InkFileExportCmd::do_export_png(), InkscapeApplication::document_revert(), end_font_face_cb(), export_do(), file_save(), Inkscape::Extension::get_file_save_path(), Inkscape::UI::Dialog::BatchExport::getBatchName(), Inkscape::UI::Dialog::BatchExport::getPreviousBatchPath(), import_style_cb(), Inkscape::UI::Dialog::Export::prependDirectory(), Inkscape::Extension::save(), Inkscape::ColorProfile::set(), Inkscape::Extension::Extension::set_environment(), Inkscape::UI::Dialog::BatchExport::setBatchPath(), SPObject::setExportFilename(), sp_file_convert_dpi(), sp_file_revert_dialog(), sp_file_save_dialog(), sp_file_save_document(), and Inkscape::ColorProfile::write().
|
inline |
basename or other human-readable label for the document.
Definition at line 238 of file document.h.
References document_name.
Referenced by Inkscape::UI::Widget::TabsWidget::_setTooltip(), SPDesktopWidget::_updateTitle(), Inkscape::UI::Dialog::DocumentResources::DocumentResources(), gui_request_dpi_fix_method(), Inkscape::UI::Dialog::Print::Print(), Inkscape::UI::Dialog::Print::run(), and Inkscape::UI::Dialog::DialogWindow::update_dialogs().
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().
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().
Inkscape::Util::Quantity SPDocument::getHeight | ( | ) | const |
Definition at line 896 of file document.cpp.
References Geom::GenericRect< C >::height(), SPDimensions::height, SVGLength::NONE, SVGLength::PERCENT, SVGLength::PX, result, root, SVGLength::unit, SVGLength::value, SPViewBox::viewBox, and SPViewBox::viewBox_set.
Referenced by Inkscape::UI::Widget::CanvasGrid::_createGuide(), Inkscape::Extension::Internal::PrintLatex::begin(), Persp3D::create_xml_element(), SPGuide::createSPGuide(), Inkscape::UI::View::SVGViewWidget::doRescale(), Inkscape::svg_renderer::get_height_px(), SPItem::getCenter(), getDimensions(), legacy_transform_backward(), legacy_transform_forward(), Inkscape::UI::Tools::lpetool_get_limiting_bbox_corners(), SPGuide::moveto(), Inkscape::UI::Dialog::Print::Print(), SPGuide::set(), Inkscape::UI::Dialog::set_document_dimensions(), SPItem::setCenter(), Inkscape::UI::Tools::MeasureTool::setGuide(), setViewBox(), Inkscape::Extension::Internal::Metafile::setViewBoxIfMissing(), InkviewWindow::show_document(), and sp_file_convert_dpi().
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().
|
static |
Returns the bottommost item from the list which is at the point, or NULL if none.
Definition at line 1625 of file document.cpp.
References c, SPObject::children, delta, Inkscape::Preferences::get(), SPItem::get_arenaitem(), Inkscape::Preferences::getDouble(), getItemFromListAtPointBottom(), SPItem::isVisibleAndUnlocked(), item, Inkscape::DrawingItem::PICK_OUTLINE, and Inkscape::DrawingItem::PICK_STICKY.
Referenced by SPDesktop::getItemFromListAtPointBottom(), and getItemFromListAtPointBottom().
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 |
Definition at line 1810 of file document.cpp.
References Inkscape::LayerManager::currentLayer(), desktop, find_items_at_point(), Inkscape::Preferences::get(), get_flat_item_list(), Inkscape::Preferences::getDouble(), item, items, key, Inkscape::LayerManager::layerForObject(), SPDesktop::layerManager(), limit, result, and Inkscape::Preferences::setDouble().
Referenced by SPDesktop::getItemsAtPoints().
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.
box | area 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().
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.
dkey | desktop view in use |
box | area to find items, in document coordinates |
take_hidden | get hidden items |
take_insensitive | get insensitive items |
take_groups | get also the groups |
enter_groups | get items inside groups |
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().
std::vector< Glib::ustring > SPDocument::getLanguages | ( | ) | const |
Returns preferred document languages (from most to least preferred)
This currently includes (in order):
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().
SPNamedView * SPDocument::getNamedView | ( | ) |
Get the namedview for this document, creates it if it's not found.
Definition at line 233 of file document.cpp.
References Inkscape::XML::Node::addChildAtPos(), Inkscape::XML::Document::createElement(), getObjectByRepr(), getReprNamedView(), rdoc, Inkscape::GC::release(), and rroot.
Referenced by SPDesktop::_attachDocument(), _updateDocument(), Inkscape::ObjectSet::createBitmapCopy(), SPGuide::createSPGuide(), SPGuide::description(), InkscapeApplication::desktopOpen(), InkFileExportCmd::do_export_vector(), fitToRect(), get_origin_follows_page(), getDisplayUnit(), has_yaxis_orientation_changed(), lock_all_guides(), SPRoot::modified(), Inkscape::PageManager::newPage(), Inkscape::Extension::Internal::SvgBuilder::pushPage(), Inkscape::PageManager::reorderPage(), Inkscape::UI::Dialog::DocumentProperties::set_content_scale(), set_display_unit(), Inkscape::UI::Dialog::set_document_dimensions(), set_origin_follows_page(), Inkscape::PageManager::setDefaultAttributes(), Inkscape::UI::Dialog::BatchExport::setDocument(), Inkscape::UI::Dialog::SingleExport::setDocument(), Inkscape::Extension::Internal::Metafile::setViewBoxIfMissing(), show_all_guides(), show_grids(), SPGrid::snapper(), toggle_clip_to_page(), and update_desktop_affine().
SPObject * SPDocument::getObjectByHref | ( | char const * | href | ) | const |
Definition at line 1196 of file document.cpp.
References getObjectById().
SPObject * SPDocument::getObjectByHref | ( | std::string const & | href | ) | const |
Definition at line 1189 of file document.cpp.
References getObjectById(), and iddef.
Referenced by copy_style_links(), Inkscape::LivePathEffect::PathArrayParam::param_readSVGValue(), Inkscape::LivePathEffect::PathParam::param_readSVGValue(), Inkscape::LivePathEffect::SatelliteParam::param_readSVGValue(), and sp_copy_resource().
SPObject * SPDocument::getObjectById | ( | char const * | id | ) | const |
Definition at line 1174 of file document.cpp.
References _parent_document, _ref_document, getObjectById(), and iddef.
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().
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().
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().
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().
std::vector< SPObject * > SPDocument::getObjectsBySelector | ( | Glib::ustring const & | selector | ) | const |
Definition at line 1282 of file document.cpp.
References _getObjectsBySelectorRecursive(), cr_sel_eng_new(), cr_selector_destroy(), cr_selector_parse_from_buf(), CR_UTF_8, Inkscape::XML::croco_node_iface, and root.
Referenced by Inkscape::UI::Dialog::StyleDialog::_getObjVec(), Inkscape::UI::Dialog::StyleDialog::_writeStyleElement(), select_by_selector(), and Inkscape::svg_renderer::set_style().
|
inline |
Definition at line 138 of file document.h.
References _original_document.
Referenced by add_actions_processing().
|
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().
|
inline |
Definition at line 165 of file document.h.
References _page_manager.
|
inline |
Definition at line 219 of file document.h.
References _parent_document.
Referenced by SPStyle::_mergeObjectStylesheet().
|
inline |
Definition at line 220 of file document.h.
References _parent_document.
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().
|
inline |
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().
|
inline |
Definition at line 214 of file document.h.
References rdoc.
Inkscape::XML::Node * SPDocument::getReprNamedView | ( | ) |
Definition at line 223 of file document.cpp.
References rroot, and sp_repr_lookup_name().
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::UI::Dialog::Print::draw_page(), InkFileExportCmd::get_bgcolor(), and getNamedView().
|
inline |
Definition at line 208 of file document.h.
References rroot.
Referenced by add_actions_processing(), Inkscape::UI::Widget::XmlTreeView::build_tree(), do_change_filename(), Inkscape::UI::Dialog::StyleDialog::documentReplaced(), Inkscape::UI::Dialog::XmlTree::documentReplaced(), Inkscape::LivePathEffect::LPEMeasureSegments::doOnApply(), file_import(), file_import_pages(), file_save(), importDefs(), SPLPEItem::isOnClipboard(), Inkscape::UI::Dialog::XmlTree::rebuildTree(), Inkscape::Extension::save(), Inkscape::Extension::Internal::OdfOutput::save(), Inkscape::Extension::Implementation::XSLT::save(), LivePathEffectObject::setOnClipboard(), sp_file_revert_dialog(), sp_import_document(), Inkscape::Extension::Internal::SvgBuilder::SvgBuilder(), and Inkscape::Extension::Internal::OdfOutput::writeContent().
std::vector< SPObject * > const SPDocument::getResourceList | ( | char const * | key | ) |
Definition at line 1921 of file document.cpp.
References key, and resources.
Referenced by Inkscape::LayerManager::_rebuild(), Inkscape::UI::Dialog::ColorItem::action_convert(), Inkscape::UI::Dialog::DocumentProperties::build_scripting(), Inkscape::UI::Dialog::DocumentProperties::changeEmbeddedScript(), Inkscape::UI::Dialog::DocumentProperties::editEmbeddedScript(), Inkscape::findBrokenLinks(), Inkscape::fixBrokenLinks(), Inkscape::LayerManager::getNextLayerName(), Inkscape::UI::Widget::ink_mesh_list_get(), GrDrag::makeStopSafeColor(), Inkscape::UI::Dialog::ColorItem::on_rightclick(), SPDesktopWidget::onFocus(), Inkscape::UI::Dialog::DocumentProperties::populate_linked_profiles_box(), Inkscape::UI::Dialog::DocumentProperties::populate_script_lists(), Inkscape::UI::Widget::GradientVectorSelector::rebuild_gui_full(), Inkscape::UI::Dialog::SwatchesPanel::rebuild_isswatch(), Inkscape::Colors::DocumentCMS::refreshResources(), Inkscape::UI::Dialog::DocumentProperties::removeExternalScript(), sp_get_pattern_list(), sp_gradient_unset_swatch(), sp_guide_delete_all_guides(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterModifier::update_filters(), Inkscape::UI::Dialog::SvgFontsDialog::update_fonts(), and Inkscape::UI::Dialog::SwatchesPanel::update_isswatch().
|
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().
|
inline |
Definition at line 203 of file document.h.
References root.
|
inline |
Definition at line 199 of file document.h.
References _router.
Referenced by avoid_item_move(), SPAvoidRef::getAttachedConnectors(), SPAvoidRef::getAttachedShapes(), SPAvoidRef::handleSettingChange(), SPConnEndPair::release(), SPConnEndPair::setAttr(), and SPAvoidRef::~SPAvoidRef().
|
inline |
Definition at line 222 of file document.h.
References _selection.
Referenced by InkscapeApplication::process_document().
|
inline |
Definition at line 225 of file document.h.
References style_cascade.
Referenced by SPStyle::_mergeObjectStylesheet(), clear_style_sheet(), and SPStyleElem::read_content().
Geom::Rect SPDocument::getViewBox | ( | ) | const |
Definition at line 944 of file document.cpp.
References preferredBounds(), root, SPViewBox::viewBox, and SPViewBox::viewBox_set.
Referenced by Inkscape::UI::Dialog::set_document_scale_helper(), Inkscape::UI::Dialog::DocumentProperties::set_viewbox_pos(), Inkscape::UI::Dialog::DocumentProperties::set_viewbox_size(), and Inkscape::UI::Dialog::DocumentProperties::update_viewbox_ui().
|
inline |
Definition at line 137 of file document.h.
References virgin.
Referenced by InkscapeApplication::create_window(), and window_open().
Inkscape::Util::Quantity SPDocument::getWidth | ( | ) | const |
Definition at line 857 of file document.cpp.
References SVGLength::NONE, SVGLength::PERCENT, SVGLength::PX, result, root, SVGLength::unit, SVGLength::value, SPViewBox::viewBox, SPViewBox::viewBox_set, Geom::GenericRect< C >::width(), and SPDimensions::width.
Referenced by Inkscape::Extension::Internal::PrintLatex::begin(), Persp3D::create_xml_element(), Inkscape::LivePathEffect::LPERuler::doEffect_pwd2(), Inkscape::UI::View::SVGViewWidget::doRescale(), Inkscape::svg_renderer::get_width_px(), SPItem::getCenter(), getDimensions(), Inkscape::LivePathEffect::LPETiling::LPETiling(), Inkscape::UI::Tools::lpetool_get_limiting_bbox_corners(), Inkscape::UI::Dialog::Print::Print(), Inkscape::LivePathEffect::LPERuler::ruler_mark(), SPItem::setCenter(), setViewBox(), Inkscape::Extension::Internal::Metafile::setViewBoxIfMissing(), InkviewWindow::show_document(), and sp_file_convert_dpi().
|
inline |
Definition at line 160 of file document.h.
References _activexmltree.
Referenced by Inkscape::UI::Dialog::StyleDialog::_writeStyleElement(), and Inkscape::UI::Dialog::StyleDialog::readStyleElement().
|
private |
Detect Y-axis orientation change.
Definition at line 1420 of file document.cpp.
References getNamedView(), SPNamedView::is_y_axis_down(), is_yaxisdown(), and root.
Referenced by _updateDocument().
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().
void SPDocument::importDefs | ( | SPDocument * | source | ) |
Paste SVG defs from the document retrieved from the clipboard or imported document into the active document.
clipdoc | The document to paste. |
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().
|
inline |
True if the desktop Y-axis points down, false if it points up.
Definition at line 276 of file document.h.
References yaxisdir().
Referenced by SPGuide::createSPGuide(), doc2dt(), fitToRect(), has_yaxis_orientation_changed(), legacy_transform_backward(), legacy_transform_forward(), SPGuide::moveto(), SPGuide::set(), Inkscape::UI::Dialog::set_document_dimensions(), SPGuide::set_normal(), Inkscape::UI::Dialog::set_up_typography_canvas(), SPPage::update(), and SPNamedView::updateViewPort().
|
inline |
Definition at line 141 of file document.h.
References modified_since_autosave.
|
inline |
Definition at line 140 of file document.h.
References modified_since_save.
Referenced by Inkscape::Extension::PrefDialog::preview_toggle(), Inkscape::Extension::save(), sp_file_revert_dialog(), and sp_file_save_document().
|
inline |
Definition at line 362 of file document.h.
References partial.
|
inline |
Definition at line 361 of file document.h.
References seeking.
Referenced by Inkscape::LivePathEffect::LPESlice::doAfterEffect(), Inkscape::LivePathEffect::LPECloneOriginal::doOnRemove(), SPObject::invoke_build(), lpeobject_ref_modified(), Inkscape::LivePathEffect::SatelliteArrayParam::param_readSVGValue(), Inkscape::LivePathEffect::SatelliteParam::param_readSVGValue(), SPLPEItem::performOnePathEffect(), and SPObject::set().
|
inline |
Definition at line 365 of file document.h.
References sensitive.
Referenced by Inkscape::LivePathEffect::LPECopyRotate::doBeforeEffect(), Inkscape::UI::Widget::EntityLineEntry::on_changed(), Inkscape::LivePathEffect::LPEFillBetweenMany::transform_multiply_nested(), and Inkscape::LivePathEffect::LPEFillBetweenStrokes::transform_multiply_nested().
|
inline |
Definition at line 352 of file document.h.
References getPerspectivesInDefs().
|
delete |
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().
Geom::OptRect SPDocument::preferredBounds | ( | ) | const |
Definition at line 978 of file document.cpp.
References getDimensions().
Referenced by Inkscape::Extension::Internal::PrintEmf::begin(), Inkscape::Extension::Internal::PrintWmf::begin(), Inkscape::PageManager::centerToPage(), InkFileExportCmd::do_export_vector(), Inkscape::svg_renderer::do_render(), Inkscape::LivePathEffect::LPEMirrorSymmetry::doBeforeEffect(), Inkscape::UI::Dialog::Print::draw_page(), Inkscape::Extension::Internal::Grid::effect(), Inkscape::Extension::Internal::Grid::effect(), Inkscape::PageManager::enablePages(), Inkscape::PageManager::getOverlappingItems(), Inkscape::PageManager::getSelectedPageRect(), Inkscape::PageManager::getSizeLabel(), getViewBox(), SPPage::isViewportPage(), pageBounds(), Inkscape::UI::Tools::PagesTool::selectionChanged(), Inkscape::UI::Dialog::SingleExport::setDefaultSelectionMode(), Inkscape::UI::Toolbar::PageToolbar::setSizeText(), SPNamedView::show(), Inkscape::Extension::Internal::sp_asbitmap_render(), Inkscape::UI::Dialog::sp_icon_doc_icon(), Inkscape::UI::Widget::CanvasGrid::updateScrollbars(), SPNamedView::updateViewPort(), and Inkscape::PageManager::zoomToPage().
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().
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.
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.
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().
void SPDocument::rebase | ( | bool | keep_namedview = true | ) |
Definition at line 606 of file document.cpp.
References document_filename, and rebase().
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().
void SPDocument::rebase | ( | Inkscape::XML::Document * | new_xmldoc, |
bool | keep_namedview = true |
||
) |
Definition at line 565 of file document.cpp.
References Inkscape::XML::Node::appendChild(), Inkscape::XML::Node::attributeList(), child, Inkscape::XML::Node::duplicate(), emitReconstructionFinish(), emitReconstructionStart(), Inkscape::XML::Node::firstChild(), getReprDoc(), Inkscape::XML::Node::lastChild(), Inkscape::XML::Node::mergeFrom(), Inkscape::XML::Node::next(), Inkscape::XML::Node::prev(), Inkscape::GC::Anchored::release(), Inkscape::GC::release(), Inkscape::XML::Node::removeChild(), Inkscape::XML::Node::root(), and Inkscape::XML::Node::setAttribute().
Referenced by Inkscape::Extension::Implementation::Script::_change_extension(), do_change_filename(), file_rebase(), rebase(), and rebase().
bool SPDocument::removeResource | ( | char const * | key, |
SPObject * | object | ||
) |
Definition at line 1897 of file document.cpp.
References SPObject::cloned, end, key, resources, resources_changed_signals, and result.
Referenced by Inkscape::ColorProfile::release(), SPFeFuncNode::release(), SPFeComponentTransfer::release(), SPFeDistantLight::release(), SPFePointLight::release(), SPFeSpotLight::release(), SPClipPath::release(), SPFilter::release(), SPFont::release(), SPGradient::release(), SPGrid::release(), SPGuide::release(), SPHatch::release(), SPImage::release(), SPGroup::release(), SPMask::release(), SPPage::release(), SPPattern::release(), SPScript::release(), SPSymbol::release(), and SPGroup::setLayerMode().
void SPDocument::removeUndoObserver | ( | Inkscape::UndoStackObserver & | observer | ) |
Definition at line 2232 of file document.cpp.
References Inkscape::CompositeUndoStackObserver::remove(), and undoStackObservers.
Referenced by Inkscape::Extension::Implementation::Script::PreviewObserver::disconnect().
void SPDocument::requestModified | ( | ) |
Definition at line 1392 of file document.cpp.
References idle_handler(), modified_connection, rerouting_connection, rerouting_handler(), SP_DOCUMENT_REROUTING_PRIORITY, and SP_DOCUMENT_UPDATE_PRIORITY.
Referenced by SPObject::requestDisplayUpdate(), and SPObject::requestModified().
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().
|
inline |
Definition at line 363 of file document.h.
References actionkey.
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().
|
inline |
Definition at line 360 of file document.h.
References _serial.
void SPDocument::set_origin_follows_page | ( | bool | on | ) |
Definition at line 2348 of file document.cpp.
References getNamedView(), and SPNamedView::set_origin_follows_page().
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.
document |
Definition at line 2322 of file document.cpp.
References _ref_document.
Referenced by SPDocument::install_reference_document::install_reference_document().
void SPDocument::setCurrentPersp3D | ( | Persp3D *const | persp | ) |
Definition at line 268 of file document.cpp.
References current_persp3d.
Referenced by Inkscape::UI::Toolbar::Box3DToolbar::_selectionChanged(), Inkscape::UI::Tools::ensure_persp_in_defs(), SPBox3D::release(), and Inkscape::UI::Tools::Box3dTool::selection_changed().
|
inline |
Definition at line 348 of file document.h.
References current_persp3d_impl.
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.
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.
Definition at line 1119 of file document.cpp.
References do_change_filename().
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().
void SPDocument::setDocumentScale | ( | const double | scaleX, |
const double | scaleY | ||
) |
Sets document scale (by changing viewBox)
Definition at line 750 of file document.cpp.
References SVGLength::computed, Geom::GenericRect< Coord >::from_xywh(), SPDimensions::height, Geom::GenericRect< C >::left(), root, Geom::GenericRect< C >::top(), SPObject::updateRepr(), SPViewBox::viewBox, SPViewBox::viewBox_set, and SPDimensions::width.
Referenced by setDocumentScale().
void SPDocument::setHeight | ( | const Inkscape::Util::Quantity & | height, |
bool | changeSize = true |
||
) |
Definition at line 913 of file document.cpp.
References SVGLength::computed, Inkscape::Util::Quantity::convert(), Geom::GenericRect< C >::height(), height, SPDimensions::height, SVGLength::PERCENT, Geom::GenericRect< C >::right(), root, Geom::GenericRect< C >::setMax(), Geom::GenericRect< C >::top(), SVGLength::unit, SPObject::updateRepr(), SVGLength::value, SPViewBox::viewBox, and SPViewBox::viewBox_set.
|
inline |
Definition at line 143 of file document.h.
References modified_since_autosave.
void SPDocument::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.
[in] | modified | True if the document has been modified. |
Definition at line 2015 of file document.cpp.
References _saved_or_modified_signal, modified_since_autosave, and modified_since_save.
Referenced by Inkscape::EventLog::checkForVirginity(), Inkscape::ObjectSet::enforceIds(), Inkscape::DocumentUndo::maybeDone(), Inkscape::UI::Widget::RegisteredColorPicker::on_changed(), Inkscape::Extension::PrefDialog::preview_toggle(), Inkscape::DocumentUndo::redo(), Inkscape::Extension::save(), Inkscape::UI::Dialog::set_color(), set_display_unit(), Inkscape::UI::Dialog::set_namedview_bool(), toggle_clip_to_page(), Inkscape::DocumentUndo::undo(), and Inkscape::UI::Widget::RegisteredWidget< W >::write_to_xml().
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.
void SPDocument::setupViewport | ( | SPItemCtx * | ctx | ) |
Definition at line 1407 of file document.cpp.
References Inkscape::Util::Quantity::convert(), SPCtx::flags, Geom::GenericRect< Coord >::from_xywh(), SPItemCtx::i2doc, SPItemCtx::i2vp, Geom::identity(), root, SPViewBox::viewBox, SPViewBox::viewBox_set, and SPItemCtx::viewport.
Referenced by _updateDocument().
void SPDocument::setViewBox | ( | ) |
Set default viewbox calculated from document properties.
Definition at line 958 of file document.cpp.
References getDisplayUnit(), getHeight(), getWidth(), and setViewBox().
Referenced by Inkscape::UI::Dialog::set_document_scale_helper(), Inkscape::UI::Dialog::set_up_typography_canvas(), Inkscape::UI::Dialog::DocumentProperties::set_viewbox_pos(), Inkscape::UI::Dialog::DocumentProperties::set_viewbox_size(), setViewBox(), Inkscape::Extension::Internal::Metafile::setViewBoxIfMissing(), and sp_file_convert_dpi().
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.
|
inline |
Definition at line 136 of file document.h.
References virgin.
Referenced by InkscapeApplication::document_revert().
void SPDocument::setWidth | ( | const Inkscape::Util::Quantity & | width, |
bool | changeSize = true |
||
) |
Definition at line 874 of file document.cpp.
References Geom::GenericRect< C >::bottom(), SVGLength::computed, Inkscape::Util::Quantity::convert(), Geom::GenericRect< C >::left(), SVGLength::PERCENT, root, Geom::GenericRect< C >::setMax(), SVGLength::unit, SPObject::updateRepr(), SVGLength::value, SPViewBox::viewBox, SPViewBox::viewBox_set, Geom::GenericRect< C >::width(), width, and SPDimensions::width.
void SPDocument::setWidthAndHeight | ( | const Inkscape::Util::Quantity & | width, |
const Inkscape::Util::Quantity & | height, | ||
bool | changeSize = true |
||
) |
Definition at line 819 of file document.cpp.
References SVGLength::computed, Inkscape::Util::Quantity::convert(), Geom::GenericRect< C >::height(), height, SPDimensions::height, Geom::GenericRect< C >::left(), SVGLength::PERCENT, root, Geom::GenericRect< C >::setMax(), Geom::GenericRect< C >::top(), SVGLength::unit, SPObject::updateRepr(), SVGLength::value, SPViewBox::viewBox, SPViewBox::viewBox_set, Geom::GenericRect< C >::width(), width, and SPDimensions::width.
Referenced by fitToRect(), Inkscape::UI::Dialog::set_document_dimensions(), Inkscape::UI::Dialog::set_up_typography_canvas(), and sp_file_convert_dpi().
|
inline |
Definition at line 159 of file document.h.
References _activexmltree.
Referenced by Inkscape::UI::Dialog::StyleDialog::_onLinkObj(), Inkscape::UI::Dialog::XmlTree::cmd_delete_node(), Inkscape::UI::Dialog::XmlTree::documentReplaced(), Inkscape::UI::Dialog::XmlTree::set_dt_select(), Inkscape::UI::Dialog::XmlTree::set_tree_select(), and Inkscape::UI::Dialog::XmlTree::stopNodeEditing().
|
private |
Update desktop transform after Y-axis orientation change.
Definition at line 1431 of file document.cpp.
References _doc2dt, SVGLength::computed, getNamedView(), SPDimensions::height, root, and shift().
Referenced by _updateDocument().
void SPDocument::update_lpobjs | ( | ) |
Definition at line 659 of file document.cpp.
References getRoot(), and sp_lpe_item_update_patheffect().
Referenced by Inkscape::DocumentUndo::redo(), and Inkscape::DocumentUndo::undo().
unsigned int SPDocument::vacuumDocument | ( | ) |
Remove unused definitions etc.
recursively from an entire document.
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().
|
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().
|
private |
Definition at line 172 of file document.h.
Referenced by getXMLDialogSelectedObject(), and setXMLDialogSelectedObject().
|
private |
Definition at line 398 of file document.h.
Referenced by _searchForChild(), and createChildDoc().
|
private |
Definition at line 175 of file document.h.
Referenced by getDocumentCMS(), getDocumentCMS(), and SPDocument().
|
private |
Orphans.
Definition at line 452 of file document.h.
Referenced by collectOrphans(), and queueForOrphanCollection().
|
private |
Definition at line 482 of file document.h.
Referenced by SPDocument(), and ~SPDocument().
|
mutableprivate |
Definition at line 410 of file document.h.
Referenced by doc2dt(), update_desktop_affine(), and yaxisdir().
|
private |
Definition at line 430 of file document.h.
Referenced by get_event_log(), and SPDocument().
|
mutableprivate |
Definition at line 422 of file document.h.
Referenced by clearNodeCache(), and get_flat_item_list().
|
private |
Definition at line 402 of file document.h.
Referenced by getOriginalDocument().
|
private |
Definition at line 174 of file document.h.
Referenced by fitToRect(), getPageManager(), getPageManager(), pageBounds(), prunePages(), setPages(), and SPDocument().
|
private |
Definition at line 400 of file document.h.
Referenced by getLanguages(), getObjectById(), getObjectById(), getParent(), and getParent().
|
private |
Definition at line 478 of file document.h.
Referenced by connectReconstructionFinish(), and emitReconstructionFinish().
|
private |
Definition at line 477 of file document.h.
Referenced by connectReconstructionStart(), and emitReconstructionStart().
|
private |
Definition at line 404 of file document.h.
Referenced by get_reference_document(), getObjectById(), getObjectById(), and set_reference_document().
|
private |
Definition at line 379 of file document.h.
Referenced by ensureUpToDate(), getRouter(), rerouting_handler(), and SPDocument().
|
private |
Definition at line 485 of file document.h.
Referenced by connectSavedOrModified(), and setModifiedSinceSave().
|
private |
Definition at line 380 of file document.h.
Referenced by getSelection(), and SPDocument().
|
private |
Definition at line 444 of file document.h.
Referenced by serial(), and SPDocument().
|
private |
Definition at line 486 of file document.h.
Referenced by _updateDocument(), and get_y_axis_flipped().
|
private |
Definition at line 446 of file document.h.
Referenced by Inkscape::DocumentUndo::maybeDone(), and Inkscape::DocumentUndo::setKeyExpires().
|
private |
Definition at line 455 of file document.h.
Referenced by getActionGroup(), and SPDocument().
|
private |
Definition at line 445 of file document.h.
Referenced by action_key(), Inkscape::DocumentUndo::maybeDone(), Inkscape::DocumentUndo::redo(), reset_key(), Inkscape::DocumentUndo::resetKey(), and Inkscape::DocumentUndo::undo().
|
private |
Definition at line 480 of file document.h.
Referenced by connectBeforeCommit(), and Inkscape::DocumentUndo::maybeDone().
|
private |
Definition at line 479 of file document.h.
Referenced by connectCommit(), and Inkscape::DocumentUndo::maybeDone().
|
private |
Definition at line 441 of file document.h.
Referenced by SPDocument().
|
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().
|
private |
Definition at line 426 of file document.h.
Referenced by getCurrentPersp3DImpl(), setCurrentPersp3DImpl(), and ~SPDocument().
|
private |
Definition at line 484 of file document.h.
Referenced by connectDestroy(), and ~SPDocument().
|
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().
|
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().
|
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().
|
private |
Definition at line 476 of file document.h.
Referenced by connectFilenameSet(), and do_change_filename().
|
private |
Dictionary of signals for id changes.
Definition at line 473 of file document.h.
Referenced by bindObjectToId(), and connectIdChanged().
|
private |
Definition at line 418 of file document.h.
Referenced by bindObjectToId(), getObjectByHref(), getObjectById(), and getObjectById().
|
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().
|
private |
Definition at line 388 of file document.h.
Referenced by ensureUpToDate(), idle_handler(), requestModified(), and ~SPDocument().
|
private |
Definition at line 475 of file document.h.
Referenced by _emitModified(), and connectModified().
|
private |
Definition at line 387 of file document.h.
Referenced by isModifiedSinceAutoSave(), setModifiedSinceAutoSaveFalse(), and setModifiedSinceSave().
|
private |
Definition at line 386 of file document.h.
Referenced by isModifiedSinceSave(), and setModifiedSinceSave().
|
private |
Definition at line 448 of file document.h.
Referenced by generate_unique_id().
|
private |
Definition at line 434 of file document.h.
Referenced by Inkscape::DocumentUndo::finish_incomplete_transaction(), isPartial(), Inkscape::DocumentUndo::maybeDone(), Inkscape::DocumentUndo::setUndoSensitive(), SPDocument(), and ~SPDocument().
|
private |
Definition at line 177 of file document.h.
Referenced by addResource(), and process_pending_resource_changes().
|
private |
Definition at line 392 of file document.h.
Referenced by copy(), createDoc(), createNewDoc(), createNewDocFromMem(), Inkscape::DocumentUndo::finish_incomplete_transaction(), getNamedView(), getReprDoc(), getReprDoc(), Inkscape::DocumentUndo::maybeDone(), Inkscape::DocumentUndo::perform_document_update(), Inkscape::DocumentUndo::redo(), Inkscape::DocumentUndo::setUndoSensitive(), Inkscape::DocumentUndo::undo(), and ~SPDocument().
|
private |
Definition at line 436 of file document.h.
Referenced by Inkscape::DocumentUndo::clearRedo(), Inkscape::DocumentUndo::redo(), and Inkscape::DocumentUndo::undo().
|
private |
Definition at line 419 of file document.h.
Referenced by bindObjectToRepr(), and getObjectByRepr().
|
private |
Definition at line 389 of file document.h.
Referenced by ensureUpToDate(), requestModified(), and ~SPDocument().
std::map<std::string, std::vector<SPObject *> > SPDocument::resources |
Definition at line 509 of file document.h.
Referenced by addResource(), getResourceList(), removeResource(), and ~SPDocument().
ResourcesChangedSignalMap SPDocument::resources_changed_signals |
Definition at line 510 of file document.h.
Referenced by addResource(), connectResourcesChanged(), emitReconstructionFinish(), process_pending_resource_changes(), and removeResource().
|
private |
Our SPRoot.
Definition at line 395 of file document.h.
Referenced by _emitModified(), _updateDocument(), doc2dt(), fitToRect(), get_flat_item_list(), getDefs(), getDocumentScale(), getGroupAtPoint(), getHeight(), getItemsInBox(), getItemsPartiallyInBox(), getObjectsByClass(), getObjectsByElement(), getObjectsBySelector(), getPerspectivesInDefs(), getRoot(), getRoot(), getViewBox(), getWidth(), has_yaxis_orientation_changed(), importDefs(), setDocumentScale(), setHeight(), setupViewport(), setViewBox(), setWidth(), setWidthAndHeight(), update_desktop_affine(), vacuumDocument(), and ~SPDocument().
|
private |
Root element of Inkscape::XML::Document.
Definition at line 393 of file document.h.
Referenced by createDoc(), createNewDoc(), getNamedView(), getReprNamedView(), and getReprRoot().
|
private |
Definition at line 443 of file document.h.
Referenced by isSeeking(), Inkscape::DocumentUndo::redo(), SPDocument(), and Inkscape::DocumentUndo::undo().
|
private |
Definition at line 433 of file document.h.
Referenced by Inkscape::DocumentUndo::cancel(), Inkscape::DocumentUndo::done(), Inkscape::DocumentUndo::getUndoSensitive(), isSensitive(), Inkscape::DocumentUndo::maybeDone(), Inkscape::DocumentUndo::redo(), Inkscape::DocumentUndo::setUndoSensitive(), SPDocument(), and Inkscape::DocumentUndo::undo().
|
private |
Definition at line 407 of file document.h.
Referenced by getStyleCascade(), and ~SPDocument().
|
private |
Definition at line 435 of file document.h.
Referenced by Inkscape::DocumentUndo::cancel(), Inkscape::DocumentUndo::clearUndo(), Inkscape::DocumentUndo::finish_incomplete_transaction(), Inkscape::DocumentUndo::maybeDone(), Inkscape::DocumentUndo::perform_document_update(), Inkscape::DocumentUndo::redo(), and Inkscape::DocumentUndo::undo().
|
private |
Definition at line 447 of file document.h.
Referenced by Inkscape::DocumentUndo::maybeDone().
|
private |
Definition at line 438 of file document.h.
Referenced by addUndoObserver(), Inkscape::DocumentUndo::clearRedo(), Inkscape::DocumentUndo::clearUndo(), Inkscape::DocumentUndo::maybeDone(), Inkscape::DocumentUndo::redo(), removeUndoObserver(), SPDocument(), and Inkscape::DocumentUndo::undo().
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().
|
private |
Has the document never been touched?
Definition at line 385 of file document.h.
Referenced by getVirgin(), Inkscape::DocumentUndo::maybeDone(), and setVirgin().