Inkscape
Vector Graphics Editor
|
#include <sp-namedview.h>
Public Member Functions | |
SPNamedView () | |
~SPNamedView () override | |
int | tag () const override |
void | show (SPDesktop *desktop) |
void | hide (SPDesktop const *desktop) |
void | setDefaultAttribute (std::string attribute, std::string preference, std::string fallback) |
Set an attribute in the named view to the value in this preference, or use the fallback. | |
void | activateGuides (void *desktop, bool active) |
char const * | getName () const |
std::vector< SPDesktop * > const | getViewList () const |
Inkscape::Util::Unit const * | getDisplayUnit () const |
Returns namedview's default unit. | |
void | setDisplayUnit (std::string unit) |
Set the display unit to the given value. | |
void | setDisplayUnit (Inkscape::Util::Unit const *unit) |
void | translateGuides (Geom::Translate const &translation) |
void | translateGrids (Geom::Translate const &translation) |
void | scrollAllDesktops (double dx, double dy) |
bool | getShowGrids () |
void | setShowGrids (bool v) |
void | toggleShowGuides () |
void | toggleLockGuides () |
void | toggleShowGrids () |
bool | getLockGuides () |
void | setLockGuides (bool v) |
void | setShowGuides (bool v) |
bool | getShowGuides () |
void | updateViewPort () |
Update the visibility of the viewport space. | |
void | newGridCreated () |
void | change_color (SPAttr color_key, SPAttr opacity_key, Colors::Color const &color) |
void | change_bool_setting (SPAttr key, bool value) |
void | set_desk_color (SPDesktop *desktop) |
void | set_clip_to_page (SPDesktop *desktop, bool enable) |
void | temporarily_show_guides (bool show) |
bool | get_origin_follows_page () const |
void | set_origin_follows_page (bool on) |
bool | is_y_axis_down () const |
void | set_y_axis_down (bool down) |
void | fix_guidelines () |
SPGrid * | getFirstEnabledGrid () |
Returns the first grid it could find that isEnabled(). | |
Colors::Color | getDeskColor () const |
Colors::Color | getGuideColor () const |
Colors::Color | getGuideHiColor () const |
![]() | |
SPObjectGroup () | |
~SPObjectGroup () override | |
int | tag () const override |
![]() | |
SPObject () | |
Constructor, sets all attributes to default values. | |
SPObject (SPObject const &)=delete | |
SPObject & | operator= (SPObject const &)=delete |
~SPObject () override | |
Destructor, frees the used memory and unreferences a potential successor of the object. | |
char const * | getId () const |
Returns the objects current ID string. | |
void | getIds (std::set< std::string > &ret) const |
Accumulate this id and all it's descendants ids. | |
std::string | getUrl () const |
Get the id in a URL format. | |
Inkscape::XML::Node * | getRepr () |
Returns the XML representation of tree. | |
Inkscape::XML::Node const * | getRepr () const |
Returns the XML representation of tree. | |
void | releaseReferences () |
Cleans up an SPObject, releasing its references and requesting that references to it be released. | |
sigc::connection | connectRelease (sigc::slot< void(SPObject *)> slot) |
Connects to the release request signal. | |
bool | isSiblingOf (SPObject const *object) const |
virtual void | getLinked (std::vector< SPObject * > &objects, LinkedObjectNature direction=LinkedObjectNature::ANY) const |
Get objects which are linked to this object as either a source or a target. | |
std::vector< SPObject * > | getLinked (LinkedObjectNature direction=LinkedObjectNature::ANY) const |
Get objects which are linked, like above. | |
bool | isAncestorOf (SPObject const *object) const |
True if object is non-NULL and this is some in/direct parent of object. | |
SPObject const * | nearestCommonAncestor (SPObject const *object) const |
Returns youngest object being parent to this and object. | |
SPObject const * | getTopAncestorNonLayer () const |
Returns ancestor non layer. | |
SPObject * | getNext () |
SPObject * | getPrev () |
Returns previous object in sibling list or NULL. | |
bool | hasChildren () const |
SPObject * | firstChild () |
SPObject const * | firstChild () const |
SPObject * | lastChild () |
SPObject const * | lastChild () const |
SPObject * | nthChild (unsigned index) |
SPObject const * | nthChild (unsigned index) const |
std::vector< SPObject * > | childList (bool add_ref, Action action=ActionGeneral) |
Retrieves the children as a std vector object, optionally ref'ing the children in the process, if add_ref is specified. | |
std::vector< SPObject * > | ancestorList (bool root_to_tip) |
Retrieves a list of ancestors of the object, as an easy to use vector. | |
SPObject * | appendChildRepr (Inkscape::XML::Node *repr) |
Append repr as child of this object. | |
char const * | label () const |
Gets the author-visible label property for the object or a default if no label is defined. | |
char const * | defaultLabel () const |
Returns a default label property for this object. | |
void | setLabel (char const *label) |
Sets the author-visible label for this object. | |
char * | title () const |
Returns the title of this object, or NULL if there is none. | |
bool | setTitle (char const *title, bool verbatim=false) |
Sets the title of this object. | |
char * | desc () const |
Returns the description of this object, or NULL if there is none. | |
bool | setDesc (char const *desc, bool verbatim=false) |
Sets the description of this object. | |
Glib::ustring | getExportFilename () const |
Get and set the exportable filename on this object. | |
void | setExportFilename (Glib::ustring filename) |
Geom::Point | getExportDpi () const |
Get and set the exported DPI for this objet, if available. | |
void | setExportDpi (Geom::Point dpi) |
CollectionPolicy | collectionPolicy () const |
Set the policy under which this object will be orphan-collected. | |
void | setCollectionPolicy (CollectionPolicy policy) |
Sets the orphan-collection policy in effect for this object. | |
void | requestOrphanCollection () |
Requests a later automatic call to collectOrphan(). | |
void | collectOrphan () |
Unconditionally delete the object if it is not referenced. | |
void | hrefObject (SPObject *owner=nullptr) |
Increase weak refcount. | |
void | unhrefObject (SPObject *owner=nullptr) |
Decrease weak refcount. | |
bool | isReferenced () |
Check if object is referenced by any other object. | |
void | deleteObject (bool propagate, bool propagate_descendants) |
Deletes an object, unparenting it from its parent. | |
void | deleteObject (bool propagate=true) |
Deletes on object. | |
void | cropToObject (SPObject *except) |
Removes all children except for the given object, it's children and it's ancesstors. | |
void | cropToObjects (std::vector< SPObject * > except_objects) |
Removes objects which are not related to given list of objects. | |
void | getObjectsExcept (std::vector< SPObject * > &objects, const std::vector< SPObject * > &except) |
Get all child objects except for any in the list. | |
void | getLinkedRecursive (std::vector< SPObject * > &objects, LinkedObjectNature direction=LinkedObjectNature::ANY) const |
Grows the input list with all linked items recursively in both child nodes and links of links. | |
sigc::connection | connectDelete (sigc::slot< void(SPObject *)> slot) |
Connects a slot to be called when an object is deleted. | |
sigc::connection | connectPositionChanged (sigc::slot< void(SPObject *)> slot) |
SPObject * | successor () |
Returns the object which supercedes this one (if any). | |
void | setSuccessor (SPObject *successor) |
Indicates that another object supercedes this one. | |
void | setTmpSuccessor (SPObject *tmpsuccessor) |
Indicates that another object supercedes temporaty this one. | |
void | unsetTmpSuccessor () |
Unset object supercedes. | |
void | fixTmpSuccessors () |
Fix temporary successors in duple stamp. | |
Inkscape::XML::Node * | updateRepr (unsigned int flags=SP_OBJECT_WRITE_EXT) |
Updates the object's repr based on the object's state. | |
Inkscape::XML::Node * | updateRepr (Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags) |
Updates the given repr based on the object's state. | |
void | requestDisplayUpdate (unsigned int flags) |
Queues an deferred update of this object's display. | |
void | updateDisplay (SPCtx *ctx, unsigned int flags) |
Updates the object's display immediately. | |
void | requestModified (unsigned int flags) |
Requests that a modification notification signal be emitted later (e.g. | |
void | emitModified (unsigned int flags) |
Emits the MODIFIED signal with the object's flags. | |
sigc::connection | connectModified (sigc::slot< void(SPObject *, unsigned int)> slot) |
Connects to the modification notification signal. | |
void | _sendDeleteSignalRecursive () |
Sends the delete signal to all children of this object recursively. | |
void | _updateTotalHRefCount (int increment) |
Adds increment to _total_hrefcount of object and its parents. | |
void | _requireSVGVersion (unsigned major, unsigned minor) |
void | _requireSVGVersion (Inkscape::Version version) |
Lifts SVG version of all root objects to version. | |
void | attach (SPObject *object, SPObject *prev) |
Put object into object tree, under parent, and behind prev; also update object's XML space. | |
void | reorder (SPObject *obj, SPObject *prev) |
In list of object's children, move object behind prev. | |
void | detach (SPObject *object) |
Remove object from parent's children, release and unref it. | |
SPObject * | get_child_by_repr (Inkscape::XML::Node *repr) |
Return object's child whose node pointer equals repr. | |
void | invoke_build (SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned) |
int | getIntAttribute (char const *key, int def) |
unsigned | getPosition () |
char const * | getAttribute (char const *name) const |
void | appendChild (Inkscape::XML::Node *child) |
void | addChild (Inkscape::XML::Node *child, Inkscape::XML::Node *prev=nullptr) |
void | setKeyValue (SPAttr key, char const *value) |
Call virtual set() function of object. | |
void | setAttribute (Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value) |
void | setAttributeDouble (Inkscape::Util::const_char_ptr key, double value) |
void | setAttributeOrRemoveIfEmpty (Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value) |
void | readAttr (char const *key) |
Read value of key attribute from XML node into object. | |
void | readAttr (SPAttr keyid) |
char const * | getTagName () const |
void | removeAttribute (char const *key) |
void | setCSS (SPCSSAttr *css, char const *attr) |
void | changeCSS (SPCSSAttr *css, char const *attr) |
bool | storeAsDouble (char const *key, double *val) const |
virtual void | read_content () |
void | recursivePrintTree (unsigned level=0) |
void | objectTrace (std::string const &, bool in=true, unsigned flags=0) |
std::string | generate_unique_id (char const *default_id=nullptr) const |
Generate a document-wide unique id for this object. | |
Public Attributes | |
bool | editable = true |
SVGBool | showguides {true} |
SVGBool | lockguides {false} |
SVGBool | grids_visible {false} |
SVGBool | clip_to_page {false} |
SVGBool | antialias_rendering {true} |
SVGBool | desk_checkerboard {false} |
double | zoom = 0 |
double | rotation = 0 |
double | cx = 0 |
double | cy = 0 |
int | window_width = 0 |
int | window_height = 0 |
int | window_x = 0 |
int | window_y = 0 |
int | window_maximized = 0 |
SnapManager | snap_manager |
Inkscape::Util::Unit const * | display_units = nullptr |
GQuark | default_layer_id = 0 |
double | connector_spacing |
std::vector< SPGuide * > | guides |
std::vector< SPGrid * > | grids |
std::vector< SPDesktop * > | views |
int | viewcount = 0 |
![]() | |
unsigned int | cloned: 1 |
SPObject * | clone_original {nullptr} |
unsigned int | uflags: 16 |
unsigned int | mflags: 16 |
SPIXmlSpace | xml_space |
Glib::ustring | lang |
unsigned int | hrefcount {0} |
unsigned int | _total_hrefcount {0} |
SPDocument * | document {nullptr} |
SPObject * | parent {nullptr} |
int | refCount {1} |
std::list< SPObject * > | hrefList |
SPStyle * | style |
Represents the style properties, whether from presentation attributes, the style attribute, or inherited. | |
SPStyle * | context_style |
Represents the style that should be used to resolve 'context-fill' and 'context-stroke'. | |
sigc::signal< void(SPObject *)> | _release_signal |
sigc::signal< void(SPObject *)> | _delete_signal |
sigc::signal< void(SPObject *)> | _position_changed_signal |
sigc::signal< void(SPObject *, unsigned int)> | _modified_signal |
SPObject * | _successor {nullptr} |
SPObject * | _tmpsuccessor {nullptr} |
CollectionPolicy | _collection_policy {SPObject::COLLECT_WITH_PARENT} |
char * | _label {nullptr} |
char * | _default_label {nullptr} |
ChildrenList | children |
Protected Member Functions | |
void | build (SPDocument *document, Inkscape::XML::Node *repr) override |
void | release () override |
void | modified (unsigned int flags) override |
void | update (SPCtx *ctx, unsigned int flags) override |
Propergate the update to the child nodes so they can be updated correctly. | |
void | set (SPAttr key, char const *value) override |
void | child_added (Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override |
void | remove_child (Inkscape::XML::Node *child) override |
void | order_changed (Inkscape::XML::Node *child, Inkscape::XML::Node *old_repr, Inkscape::XML::Node *new_repr) override |
Inkscape::XML::Node * | write (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override |
![]() | |
void | child_added (Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override |
void | remove_child (Inkscape::XML::Node *child) override |
void | order_changed (Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *new_repr) override |
Inkscape::XML::Node * | write (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override |
![]() | |
virtual void | tag_name_changed (gchar const *oldname, gchar const *newname) |
Private Member Functions | |
void | updateGuides () |
void | updateGrids () |
void | setShowGuideSingle (SPGuide *guide) |
Private Attributes | |
std::unique_ptr< Inkscape::CanvasPage > | _viewport |
bool | _sync_grids = true |
std::optional< Colors::Color > | _desk_color |
std::optional< Colors::Color > | _guide_color |
std::optional< Colors::Color > | _guide_hi_color |
double | _guide_opacity = 0.6 |
double | _guide_hi_opacity = 0.5 |
SVGBool | _origin_correction {true} |
SVGBool | _y_axis_down {true} |
Friends | |
class | SPDocument |
Additional Inherited Members | |
![]() | |
enum | CollectionPolicy { COLLECT_WITH_PARENT , ALWAYS_COLLECT } |
enum class | LinkedObjectNature { DEPENDENT = -1 , ANY = 0 , DEPENDENCY = 1 } |
enum | Action { ActionGeneral , ActionBBox , ActionUpdate , ActionShow } |
typedef Inkscape::Util::ForwardPointerIterator< SPObject, ParentIteratorStrategy > | ParentIterator |
typedef Inkscape::Util::ForwardPointerIterator< SPObject const, ParentIteratorStrategy > | ConstParentIterator |
using | ChildrenList = boost::intrusive::list< SPObject, boost::intrusive::member_hook< SPObject, ListHook, &SPObject::_child_hook > > |
![]() | |
typedef boost::intrusive::list_member_hook | ListHook |
![]() | |
ListHook | _child_hook |
Definition at line 49 of file sp-namedview.h.
SPNamedView::SPNamedView | ( | ) |
Definition at line 56 of file sp-namedview.cpp.
References _viewport, connector_spacing, defaultConnSpacing, and Inkscape::CanvasPage::hide().
|
override |
Definition at line 65 of file sp-namedview.cpp.
void SPNamedView::activateGuides | ( | void * | desktop, |
bool | active | ||
) |
Definition at line 748 of file sp-namedview.cpp.
References desktop, SPDesktop::getCanvas(), guides, and views.
Referenced by SPDesktop::activate_guides().
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 68 of file sp-namedview.cpp.
References Inkscape::PageManager::addPage(), ALIGNMENTTOLERANCE, BORDERCOLOR, BORDERLAYER, BORDEROPACITY, SPObject::build(), child, SPObject::children, DISTRIBUTIONTOLERANCE, SPObject::document, getGuideColor(), getGuideHiColor(), SPDocument::getPageManager(), grids, GRIDTOLERANCE, GUIDECOLOR, GUIDEHICOLOR, GUIDEHIOPACITY, GUIDEOPACITY, guides, GUIDETOLERANCE, INKSCAPE_ANTIALIAS_RENDERING, INKSCAPE_CLIP_TO_PAGE_RENDERING, INKSCAPE_COLOR, INKSCAPE_CONNECTOR_SPACING, INKSCAPE_CURRENT_LAYER, INKSCAPE_CX, INKSCAPE_CY, INKSCAPE_DESK_CHECKERBOARD, INKSCAPE_DESK_COLOR, INKSCAPE_DOCUMENT_UNITS, INKSCAPE_LOCKGUIDES, INKSCAPE_ORIGIN_CORRECTION, INKSCAPE_PAGESHADOW, INKSCAPE_ROTATION, INKSCAPE_WINDOW_HEIGHT, INKSCAPE_WINDOW_MAXIMIZED, INKSCAPE_WINDOW_WIDTH, INKSCAPE_WINDOW_X, INKSCAPE_WINDOW_Y, INKSCAPE_Y_AXIS_DOWN, INKSCAPE_ZOOM, OBJECTTOLERANCE, page, PAGECOLOR, PAGELABELSTYLE, SPObject::readAttr(), SPObject::repr, SHOWBORDER, SHOWGRIDS, SHOWGUIDES, SHOWPAGESHADOW, UNITS, and VIEWONLY.
void SPNamedView::change_bool_setting | ( | SPAttr | key, |
bool | value | ||
) |
Definition at line 963 of file sp-namedview.cpp.
References SPObject::getRepr(), key, PAGELABELSTYLE, Inkscape::XML::Node::setAttribute(), SHAPE_RENDERING, and sp_attribute_name().
Referenced by Inkscape::UI::Dialog::set_namedview_bool(), and toggle_clip_to_page().
void SPNamedView::change_color | ( | SPAttr | color_key, |
SPAttr | opacity_key, | ||
Colors::Color const & | color | ||
) |
Definition at line 957 of file sp-namedview.cpp.
References Inkscape::Colors::Color::getOpacity(), SPObject::getRepr(), Inkscape::Colors::Color::hasOpacity(), Inkscape::XML::Node::setAttribute(), Inkscape::XML::Node::setAttributeCssDouble(), sp_attribute_name(), and Inkscape::Colors::Color::toString().
Referenced by Inkscape::UI::Dialog::set_color().
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 427 of file sp-namedview.cpp.
References Inkscape::PageManager::addPage(), child, SPObjectGroup::child_added(), SPObject::document, editable, getGuideColor(), getGuideHiColor(), SPDocument::getObjectByRepr(), SPDocument::getPageManager(), grids, guides, INKSCAPE_COLOR, page, ref, setShowGuideSingle(), and views.
void SPNamedView::fix_guidelines | ( | ) |
Definition at line 1002 of file sp-namedview.cpp.
References guides.
|
inline |
Definition at line 122 of file sp-namedview.h.
References _origin_correction.
Inkscape::Colors::Color SPNamedView::getDeskColor | ( | ) | const |
Definition at line 146 of file sp-namedview.cpp.
References _desk_color, and default_desk_color.
Referenced by Inkscape::BooleanBuilder::redraw_items(), set_desk_color(), and Inkscape::PageManager::setDefaultAttributes().
Inkscape::Util::Unit const * SPNamedView::getDisplayUnit | ( | ) | const |
Returns namedview's default unit.
If no default unit is set, "px" is returned
Definition at line 901 of file sp-namedview.cpp.
References display_units.
Referenced by SPDesktopWidget::_updateNamedview(), SPDesktopWidget::_updateUnit(), modified(), Inkscape::UI::Toolbar::MeasureToolbar::setDesktop(), Inkscape::UI::Tools::MeasureTool::showInfoBox(), and SPDesktopWidget::switchDesktop().
SPGrid * SPNamedView::getFirstEnabledGrid | ( | ) |
Returns the first grid it could find that isEnabled().
Returns NULL, if none is enabled
Definition at line 925 of file sp-namedview.cpp.
References grids.
Referenced by Inkscape::UI::Widget::CanvasGrid::_createGuideItem().
Inkscape::Colors::Color SPNamedView::getGuideColor | ( | ) | const |
Definition at line 151 of file sp-namedview.cpp.
References _guide_color, _guide_opacity, and default_guide_color.
Referenced by build(), child_added(), and set().
Inkscape::Colors::Color SPNamedView::getGuideHiColor | ( | ) | const |
Definition at line 158 of file sp-namedview.cpp.
References _guide_hi_color, _guide_hi_opacity, and default_guide_hi_color.
Referenced by Inkscape::UI::Widget::CanvasGrid::_createGuideItem(), build(), child_added(), and set().
bool SPNamedView::getLockGuides | ( | ) |
Definition at line 842 of file sp-namedview.cpp.
References Inkscape::XML::Node::getAttributeBoolean(), SPObject::getRepr(), and SPObject::repr.
Referenced by Inkscape::UI::Widget::CanvasGrid::_createGuide(), Inkscape::UI::Dialog::GuidelinePropertiesDialog::_setup(), toggleLockGuides(), and updateGuides().
gchar const * SPNamedView::getName | ( | ) | const |
Definition at line 759 of file sp-namedview.cpp.
References SPObject::getAttribute().
bool SPNamedView::getShowGrids | ( | ) |
Definition at line 797 of file sp-namedview.cpp.
References grids_visible.
Referenced by SPDesktop::_attachDocument(), SnapManager::getGridSnappers(), SnapManager::multipleOfGridPitch(), toggleShowGrids(), and updateGrids().
bool SPNamedView::getShowGuides | ( | ) |
Definition at line 832 of file sp-namedview.cpp.
References Inkscape::XML::Node::getAttributeBoolean(), SPObject::getRepr(), and SPObject::repr.
Referenced by setShowGuideSingle(), SPDesktop::setTempHideOverlays(), toggleShowGuides(), and updateGuides().
std::vector< SPDesktop * > const SPNamedView::getViewList | ( | ) | const |
Definition at line 764 of file sp-namedview.cpp.
References views.
void SPNamedView::hide | ( | SPDesktop const * | desktop | ) |
Definition at line 708 of file sp-namedview.cpp.
References _viewport, desktop, SPObject::document, SPDesktop::getCanvas(), SPDocument::getPageManager(), Inkscape::PageManager::getPages(), grids, guides, page, and views.
Referenced by SPDesktop::_detachDocument().
|
inline |
Definition at line 125 of file sp-namedview.h.
References _y_axis_down.
Referenced by SPDocument::has_yaxis_orientation_changed().
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 175 of file sp-namedview.cpp.
References _viewport, antialias_rendering, child, SPObject::childList(), clip_to_page, desktop, SPObject::document, SPDocument::getActionGroup(), SPDesktop::getCanvas(), getDisplayUnit(), SPDocument::getPageManager(), page, Inkscape::UI::Widget::Canvas::set_antialiasing_enabled(), set_clip_to_page(), set_desk_color(), Inkscape::PageManager::setDefaultAttributes(), updateGuides(), updateViewPort(), and views.
void SPNamedView::newGridCreated | ( | ) |
Definition at line 851 of file sp-namedview.cpp.
References _sync_grids, grids_visible, and setShowGrids().
Referenced by Inkscape::UI::Dialog::DocumentProperties::onNewGrid().
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 496 of file sp-namedview.cpp.
References child, SPObject::document, SPDocument::getPageManager(), SPObjectGroup::order_changed(), and Inkscape::PageManager::reorderPage().
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 129 of file sp-namedview.cpp.
References grids, guides, and SPObject::release().
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 470 of file sp-namedview.cpp.
References child, SPObject::document, SPDocument::getPageManager(), grids, guides, SPObjectGroup::remove_child(), Inkscape::PageManager::removePage(), and views.
void SPNamedView::scrollAllDesktops | ( | double | dx, |
double | dy | ||
) |
Definition at line 951 of file sp-namedview.cpp.
References views.
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 260 of file sp-namedview.cpp.
References _desk_color, _guide_color, _guide_hi_color, _guide_hi_opacity, _guide_opacity, _origin_correction, _y_axis_down, ALIGNMENTTOLERANCE, antialias_rendering, clip_to_page, connector_spacing, cx, cy, default_layer_id, defaultConnSpacing, desk_checkerboard, display_units, DISTRIBUTIONTOLERANCE, SPObject::document, editable, getGuideColor(), getGuideHiColor(), SPDocument::getPageManager(), grids_visible, GRIDTOLERANCE, GUIDECOLOR, GUIDEHICOLOR, GUIDEHIOPACITY, GUIDEOPACITY, guides, GUIDETOLERANCE, INKSCAPE_ANTIALIAS_RENDERING, INKSCAPE_CLIP_TO_PAGE_RENDERING, INKSCAPE_COLOR, INKSCAPE_CONNECTOR_SPACING, INKSCAPE_CURRENT_LAYER, INKSCAPE_CX, INKSCAPE_CY, INKSCAPE_DESK_CHECKERBOARD, INKSCAPE_DESK_COLOR, INKSCAPE_DOCUMENT_UNITS, INKSCAPE_LOCKGUIDES, INKSCAPE_ORIGIN_CORRECTION, INKSCAPE_ROTATION, INKSCAPE_WINDOW_HEIGHT, INKSCAPE_WINDOW_MAXIMIZED, INKSCAPE_WINDOW_WIDTH, INKSCAPE_WINDOW_X, INKSCAPE_WINDOW_Y, INKSCAPE_Y_AXIS_DOWN, INKSCAPE_ZOOM, key, lockguides, OBJECTTOLERANCE, SVGBool::readOrUnset(), SPObject::requestModified(), rotation, SPObject::set(), Inkscape::SnapPreferences::setAlignementTolerance(), Inkscape::SnapPreferences::setDistributionTolerance(), Inkscape::SnapPreferences::setGridTolerance(), Inkscape::SnapPreferences::setGuideTolerance(), Inkscape::SnapPreferences::setObjectTolerance(), SHOWGRIDS, SHOWGUIDES, showguides, snap_manager, SnapManager::snapprefs, sp_parse_document_units(), Inkscape::PageManager::subset(), updateGrids(), VIEWONLY, window_height, window_maximized, window_width, window_x, window_y, and zoom.
void SPNamedView::set_clip_to_page | ( | SPDesktop * | desktop, |
bool | enable | ||
) |
Definition at line 136 of file sp-namedview.cpp.
References desktop, SPDesktop::getCanvas(), and Inkscape::UI::Widget::Canvas::set_clip_to_page_mode().
Referenced by modified().
void SPNamedView::set_desk_color | ( | SPDesktop * | desktop | ) |
Definition at line 165 of file sp-namedview.cpp.
References _viewport, desk_checkerboard, desktop, SPObject::document, SPDesktop::getCanvas(), getDeskColor(), SPDocument::getPageManager(), Inkscape::UI::Widget::Canvas::set_desk(), and Inkscape::PageManager::setDefaultAttributes().
Referenced by SPDesktop::_attachDocument(), and modified().
void SPNamedView::set_origin_follows_page | ( | bool | on | ) |
Definition at line 988 of file sp-namedview.cpp.
References SPObject::getRepr(), SPObject::repr, SPObject::requestModified(), and Inkscape::XML::Node::setAttributeBoolean().
Referenced by SPDocument::set_origin_follows_page().
void SPNamedView::set_y_axis_down | ( | bool | down | ) |
Definition at line 995 of file sp-namedview.cpp.
References SPObject::getRepr(), SPObject::repr, SPObject::requestModified(), and Inkscape::XML::Node::setAttributeBoolean().
void SPNamedView::setDefaultAttribute | ( | std::string | attribute, |
std::string | preference, | ||
std::string | fallback | ||
) |
Set an attribute in the named view to the value in this preference, or use the fallback.
attribute | - The svg namedview attribute to set. |
preference | - The preference to find the value from (optional) |
fallback | - The fallback to use if preference not set or not found. (optional) |
Definition at line 732 of file sp-namedview.cpp.
References SPObject::getAttribute(), and SPObject::setAttribute().
void SPNamedView::setDisplayUnit | ( | Inkscape::Util::Unit const * | unit | ) |
Definition at line 914 of file sp-namedview.cpp.
References Inkscape::Util::Unit::abbr, display_units, SPObject::getRepr(), and Inkscape::XML::Node::setAttributeOrRemoveIfEmpty().
void SPNamedView::setDisplayUnit | ( | std::string | unit | ) |
Set the display unit to the given value.
Definition at line 909 of file sp-namedview.cpp.
References setDisplayUnit().
Referenced by setDisplayUnit().
void SPNamedView::setLockGuides | ( | bool | v | ) |
Definition at line 813 of file sp-namedview.cpp.
References SPObject::document, SPObject::getRepr(), SPObject::repr, SPObject::requestModified(), and Inkscape::XML::Node::setAttributeBoolean().
Referenced by Inkscape::UI::Widget::CanvasGrid::_createGuide(), and toggleLockGuides().
void SPNamedView::setShowGrids | ( | bool | v | ) |
Definition at line 784 of file sp-namedview.cpp.
References SPGrid::create_new(), SPObject::document, SPObject::getRepr(), grids, RECTANGULAR, SPObject::requestModified(), and Inkscape::XML::Node::setAttributeBoolean().
Referenced by SPDesktop::_attachDocument(), newGridCreated(), and toggleShowGrids().
void SPNamedView::setShowGuides | ( | bool | v | ) |
Definition at line 802 of file sp-namedview.cpp.
References SPObject::document, SPObject::getRepr(), SPObject::repr, SPObject::requestModified(), and Inkscape::XML::Node::setAttributeBoolean().
Referenced by Inkscape::UI::Widget::CanvasGrid::_createGuideItem(), and toggleShowGuides().
|
private |
Definition at line 824 of file sp-namedview.cpp.
References getShowGuides(), SPGuide::hideSPGuide(), and SPGuide::showSPGuide().
Referenced by child_added(), show(), and updateGuides().
void SPNamedView::show | ( | SPDesktop * | desktop | ) |
Definition at line 519 of file sp-namedview.cpp.
References _viewport, desktop, SPObject::document, SPDesktop::getCanvas(), SPDesktop::getCanvasGuides(), SPDesktop::getCanvasPagesBg(), SPDesktop::getCanvasPagesFg(), SPDocument::getPageManager(), Inkscape::PageManager::getPages(), grids, guides, SPDesktop::guides_active, page, SPDocument::preferredBounds(), Inkscape::PageManager::setDefaultAttributes(), setShowGuideSingle(), updateViewPort(), and views.
Referenced by SPDesktop::_attachDocument(), and temporarily_show_guides().
|
inlineoverridevirtual |
void SPNamedView::temporarily_show_guides | ( | bool | show | ) |
Definition at line 976 of file sp-namedview.cpp.
References SPObject::document, SPDocument::getPageManager(), Inkscape::PageManager::getPages(), guides, page, and show().
Referenced by SPDesktop::setTempHideOverlays().
void SPNamedView::toggleLockGuides | ( | ) |
Definition at line 774 of file sp-namedview.cpp.
References getLockGuides(), and setLockGuides().
Referenced by lock_all_guides(), and SPDesktop::toggleLockGuides().
void SPNamedView::toggleShowGrids | ( | ) |
Definition at line 779 of file sp-namedview.cpp.
References getShowGrids(), and setShowGrids().
Referenced by show_grids().
void SPNamedView::toggleShowGuides | ( | ) |
Definition at line 769 of file sp-namedview.cpp.
References getShowGuides(), and setShowGuides().
Referenced by Inkscape::UI::Widget::CanvasGrid::_rulerButtonRelease(), and show_all_guides().
void SPNamedView::translateGrids | ( | Geom::Translate const & | translation | ) |
Definition at line 944 of file sp-namedview.cpp.
References SPObject::document, SPDocument::getDocumentScale(), grids, and scale.
void SPNamedView::translateGuides | ( | Geom::Translate const & | translation | ) |
Definition at line 935 of file sp-namedview.cpp.
References SPGuide::getPoint(), guides, and SPGuide::moveto().
|
overrideprotectedvirtual |
Propergate the update to the child nodes so they can be updated correctly.
Reimplemented from SPObject.
Definition at line 214 of file sp-namedview.cpp.
References child, and SPObject::childList().
|
private |
Definition at line 859 of file sp-namedview.cpp.
References _sync_grids, SPObject::document, SPDocument::getActionGroup(), getShowGrids(), and grids.
Referenced by set().
|
private |
Definition at line 874 of file sp-namedview.cpp.
References SPObject::document, SPDocument::getActionGroup(), getLockGuides(), getShowGuides(), guides, and setShowGuideSingle().
Referenced by modified().
void SPNamedView::updateViewPort | ( | ) |
Update the visibility of the viewport space.
This can look like a page if there's no multi-pages, or invisible if it shadows the first page.
Definition at line 410 of file sp-namedview.cpp.
References _viewport, SPObject::document, Inkscape::PageManager::getPageAt(), SPDocument::getPageManager(), SPDocument::is_yaxisdown(), page, and SPDocument::preferredBounds().
Referenced by modified(), SPRoot::modified(), and show().
|
overrideprotectedvirtual |
Reimplemented from SPObject.
Definition at line 505 of file sp-namedview.cpp.
References Inkscape::XML::Node::duplicate(), SPObject::getRepr(), Inkscape::XML::Node::mergeFrom(), and SPObject::repr.
|
friend |
Definition at line 141 of file sp-namedview.h.
|
private |
Definition at line 145 of file sp-namedview.h.
Referenced by getDeskColor(), and set().
|
private |
Definition at line 146 of file sp-namedview.h.
Referenced by getGuideColor(), and set().
|
private |
Definition at line 147 of file sp-namedview.h.
Referenced by getGuideHiColor(), and set().
|
private |
Definition at line 149 of file sp-namedview.h.
Referenced by getGuideHiColor(), and set().
|
private |
Definition at line 148 of file sp-namedview.h.
Referenced by getGuideColor(), and set().
|
private |
Definition at line 151 of file sp-namedview.h.
Referenced by get_origin_follows_page(), and set().
|
private |
Definition at line 144 of file sp-namedview.h.
Referenced by newGridCreated(), and updateGrids().
|
private |
Definition at line 143 of file sp-namedview.h.
Referenced by hide(), modified(), set_desk_color(), show(), SPNamedView(), and updateViewPort().
|
private |
Definition at line 152 of file sp-namedview.h.
Referenced by is_y_axis_down(), and set().
SVGBool SPNamedView::antialias_rendering {true} |
Definition at line 60 of file sp-namedview.h.
Referenced by modified(), and set().
SVGBool SPNamedView::clip_to_page {false} |
Definition at line 59 of file sp-namedview.h.
Referenced by modified(), SPDesktop::quick_preview(), set(), and toggle_clip_to_page().
double SPNamedView::connector_spacing |
Definition at line 75 of file sp-namedview.h.
Referenced by avoid_item_poly(), graphlayout(), Inkscape::UI::Toolbar::ConnectorToolbar::notifyAttributeChanged(), set(), and SPNamedView().
double SPNamedView::cx = 0 |
Definition at line 64 of file sp-namedview.h.
Referenced by set(), and sp_namedview_zoom_and_view_from_document().
double SPNamedView::cy = 0 |
Definition at line 65 of file sp-namedview.h.
Referenced by set(), and sp_namedview_zoom_and_view_from_document().
GQuark SPNamedView::default_layer_id = 0 |
Definition at line 74 of file sp-namedview.h.
Referenced by set(), and sp_namedview_update_layers_from_document().
SVGBool SPNamedView::desk_checkerboard {false} |
Definition at line 61 of file sp-namedview.h.
Referenced by set(), and set_desk_color().
Inkscape::Util::Unit const* SPNamedView::display_units = nullptr |
Definition at line 72 of file sp-namedview.h.
Referenced by Inkscape::UI::Node::_getDragTip(), Inkscape::UI::Tools::PenTool::_setAngleDistanceStatusMessage(), Inkscape::UI::Dialog::GuidelinePropertiesDialog::_setup(), SPGuide::description(), Inkscape::UI::Dialog::Transformation::desktopReplaced(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), getDisplayUnit(), Inkscape::UI::Tools::TextTool::root_handler(), set(), Inkscape::UI::Widget::SelectedStyle::setDesktop(), setDisplayUnit(), Inkscape::UI::Dialog::SingleExport::setupUnits(), Inkscape::UI::Widget::StrokeStyle::StrokeStyle(), and Inkscape::UI::Widget::StrokeStyle::updateLine().
bool SPNamedView::editable = true |
Definition at line 55 of file sp-namedview.h.
Referenced by child_added(), and set().
std::vector<SPGrid *> SPNamedView::grids |
Definition at line 77 of file sp-namedview.h.
Referenced by build(), child_added(), getFirstEnabledGrid(), SnapManager::getGridSnappers(), hide(), SnapManager::multipleOfGridPitch(), Inkscape::UI::Dialog::DocumentProperties::rebuild_gridspage(), release(), remove_child(), setShowGrids(), show(), translateGrids(), and updateGrids().
SVGBool SPNamedView::grids_visible {false} |
Definition at line 58 of file sp-namedview.h.
Referenced by getShowGrids(), newGridCreated(), and set().
std::vector<SPGuide *> SPNamedView::guides |
Definition at line 76 of file sp-namedview.h.
Referenced by activateGuides(), build(), child_added(), fix_guidelines(), hide(), release(), remove_child(), set(), Inkscape::UI::Dialog::set_document_dimensions(), show(), temporarily_show_guides(), translateGuides(), and updateGuides().
SVGBool SPNamedView::lockguides {false} |
Definition at line 57 of file sp-namedview.h.
Referenced by SPGuide::createSPGuide(), and set().
double SPNamedView::rotation = 0 |
Definition at line 63 of file sp-namedview.h.
Referenced by set(), and sp_namedview_zoom_and_view_from_document().
SVGBool SPNamedView::showguides {true} |
Definition at line 56 of file sp-namedview.h.
Referenced by set().
SnapManager SPNamedView::snap_manager |
Definition at line 71 of file sp-namedview.h.
Referenced by Inkscape::UI::Tools::ConnectorTool::_handleButtonPress(), Inkscape::UI::Tools::PenTool::_handleButtonPress(), Inkscape::UI::Tools::PencilTool::_handleButtonPress(), Inkscape::UI::Tools::ConnectorTool::_handleButtonRelease(), Inkscape::UI::Tools::PenTool::_handleMotionNotify(), Inkscape::UI::Tools::PencilTool::_handleMotionNotify(), Inkscape::UI::Tools::ConnectorTool::_handleMotionNotify(), Inkscape::SelTrans::_keepClosestPointOnly(), Inkscape::UI::Tools::PenTool::_setToNearestHorizVert(), Inkscape::UI::PathManipulator::_updateDragPoint(), Inkscape::SelTrans::centerRequest(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::UI::CurveDragPoint::dragged(), Inkscape::UI::Handle::dragged(), Inkscape::UI::Node::dragged(), Inkscape::SelTrans::getNextClosestPoint(), Inkscape::UI::TransformHandle::getNextClosestPoint(), Inkscape::UI::Tools::PagesTool::getSnappedResizePoint(), gr_knot_moved_handler(), gr_knot_moved_midpoint_handler(), Inkscape::SelTrans::grab(), Inkscape::UI::Tools::MeasureTool::knotEndMovedHandler(), Inkscape::UI::Tools::MeasureTool::knotStartMovedHandler(), Inkscape::SelTrans::moveTo(), Inkscape::UI::Tools::PagesTool::moveTo(), Inkscape::UI::Tools::ArcTool::root_handler(), Inkscape::UI::Tools::Box3dTool::root_handler(), Inkscape::UI::Tools::MeasureTool::root_handler(), Inkscape::UI::Tools::MeshTool::root_handler(), Inkscape::UI::Tools::NodeTool::root_handler(), Inkscape::UI::Tools::RectTool::root_handler(), Inkscape::UI::Tools::SpiralTool::root_handler(), Inkscape::UI::Tools::StarTool::root_handler(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::SelTrans::rotateRequest(), Inkscape::UI::Widget::ruler_snap_new_guide(), Inkscape::SelTrans::scaleRequest(), set(), Inkscape::SelTrans::skewRequest(), KnotHolderEntity::snap_knot_position(), KnotHolderEntity::snap_knot_position_constrained(), Inkscape::snap_rectangular_box(), SPGrid::snapper(), sp_dt_guide_event(), sp_import_document(), Inkscape::UI::Tools::spdc_endpoint_snap_free(), Inkscape::UI::Tools::spdc_endpoint_snap_rotation(), Inkscape::SelTrans::stretchRequest(), and Box3D::vp_knot_moved_handler().
int SPNamedView::viewcount = 0 |
Definition at line 79 of file sp-namedview.h.
Referenced by SPDesktop::_attachDocument().
std::vector<SPDesktop *> SPNamedView::views |
Definition at line 78 of file sp-namedview.h.
Referenced by activateGuides(), child_added(), getViewList(), hide(), modified(), remove_child(), scrollAllDesktops(), and show().
int SPNamedView::window_height = 0 |
Definition at line 67 of file sp-namedview.h.
Referenced by set(), and sp_namedview_window_from_document().
int SPNamedView::window_maximized = 0 |
Definition at line 70 of file sp-namedview.h.
Referenced by set(), and sp_namedview_window_from_document().
int SPNamedView::window_width = 0 |
Definition at line 66 of file sp-namedview.h.
Referenced by set(), and sp_namedview_window_from_document().
int SPNamedView::window_x = 0 |
Definition at line 68 of file sp-namedview.h.
Referenced by set(), and sp_namedview_window_from_document().
int SPNamedView::window_y = 0 |
Definition at line 69 of file sp-namedview.h.
Referenced by set(), and sp_namedview_window_from_document().
double SPNamedView::zoom = 0 |
Definition at line 62 of file sp-namedview.h.
Referenced by set(), and sp_namedview_zoom_and_view_from_document().