Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPNamedView Class Referencefinal

#include <sp-namedview.h>

Inheritance diagram for SPNamedView:
SPObjectGroup SPObject Inkscape::XML::NodeObserver

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 ()
 
SPGridgetFirstEnabledGrid ()
 Returns the first grid it could find that isEnabled().
 
Colors::Color getDeskColor () const
 
Colors::Color getGuideColor () const
 
Colors::Color getGuideHiColor () const
 
- Public Member Functions inherited from SPObjectGroup
 SPObjectGroup ()
 
 ~SPObjectGroup () override
 
int tag () const override
 
- Public Member Functions inherited from SPObject
 SPObject ()
 Constructor, sets all attributes to default values.
 
 SPObject (SPObject const &)=delete
 
SPObjectoperator= (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::NodegetRepr ()
 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.
 
SPObjectgetNext ()
 
SPObjectgetPrev ()
 Returns previous object in sibling list or NULL.
 
bool hasChildren () const
 
SPObjectfirstChild ()
 
SPObject const * firstChild () const
 
SPObjectlastChild ()
 
SPObject const * lastChild () const
 
SPObjectnthChild (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.
 
SPObjectappendChildRepr (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)
 
SPObjectsuccessor ()
 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::NodeupdateRepr (unsigned int flags=SP_OBJECT_WRITE_EXT)
 Updates the object's repr based on the object's state.
 
Inkscape::XML::NodeupdateRepr (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.
 
SPObjectget_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
 
- Public Attributes inherited from SPObject
unsigned int cloned: 1
 
SPObjectclone_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}
 
SPDocumentdocument {nullptr}
 
SPObjectparent {nullptr}
 
int refCount {1}
 
std::list< SPObject * > hrefList
 
SPStylestyle
 Represents the style properties, whether from presentation attributes, the style attribute, or inherited.
 
SPStylecontext_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::Nodewrite (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
 
- Protected Member Functions inherited from SPObjectGroup
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::Nodewrite (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
 
- Protected Member Functions inherited from SPObject
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

- Public Types inherited from SPObject
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, ParentIteratorStrategyParentIterator
 
typedef Inkscape::Util::ForwardPointerIterator< SPObject const, ParentIteratorStrategyConstParentIterator
 
using ChildrenList = boost::intrusive::list< SPObject, boost::intrusive::member_hook< SPObject, ListHook, &SPObject::_child_hook > >
 
- Protected Types inherited from SPObject
typedef boost::intrusive::list_member_hook ListHook
 
- Protected Attributes inherited from SPObject
ListHook _child_hook
 

Detailed Description

Definition at line 49 of file sp-namedview.h.

Constructor & Destructor Documentation

◆ SPNamedView()

SPNamedView::SPNamedView ( )

◆ ~SPNamedView()

SPNamedView::~SPNamedView ( )
override

Definition at line 65 of file sp-namedview.cpp.

Member Function Documentation

◆ activateGuides()

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().

◆ build()

◆ change_bool_setting()

void SPNamedView::change_bool_setting ( SPAttr  key,
bool  value 
)

◆ change_color()

◆ child_added()

◆ fix_guidelines()

void SPNamedView::fix_guidelines ( )

Definition at line 1002 of file sp-namedview.cpp.

References guides.

◆ get_origin_follows_page()

bool SPNamedView::get_origin_follows_page ( ) const
inline

Definition at line 122 of file sp-namedview.h.

References _origin_correction.

◆ getDeskColor()

◆ getDisplayUnit()

Inkscape::Util::Unit const * SPNamedView::getDisplayUnit ( ) const

◆ getFirstEnabledGrid()

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().

◆ getGuideColor()

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().

◆ getGuideHiColor()

Inkscape::Colors::Color SPNamedView::getGuideHiColor ( ) const

◆ getLockGuides()

◆ getName()

gchar const * SPNamedView::getName ( ) const

Definition at line 759 of file sp-namedview.cpp.

References SPObject::getAttribute().

◆ getShowGrids()

bool SPNamedView::getShowGrids ( )

◆ getShowGuides()

◆ getViewList()

std::vector< SPDesktop * > const SPNamedView::getViewList ( ) const

Definition at line 764 of file sp-namedview.cpp.

References views.

◆ hide()

◆ is_y_axis_down()

bool SPNamedView::is_y_axis_down ( ) const
inline

Definition at line 125 of file sp-namedview.h.

References _y_axis_down.

Referenced by SPDocument::has_yaxis_orientation_changed().

◆ modified()

◆ newGridCreated()

void SPNamedView::newGridCreated ( )

◆ order_changed()

void SPNamedView::order_changed ( Inkscape::XML::Node child,
Inkscape::XML::Node old_repr,
Inkscape::XML::Node new_repr 
)
overrideprotectedvirtual

◆ release()

void SPNamedView::release ( )
overrideprotectedvirtual

Reimplemented from SPObject.

Definition at line 129 of file sp-namedview.cpp.

References grids, guides, and SPObject::release().

◆ remove_child()

void SPNamedView::remove_child ( Inkscape::XML::Node child)
overrideprotectedvirtual

◆ scrollAllDesktops()

void SPNamedView::scrollAllDesktops ( double  dx,
double  dy 
)

Definition at line 951 of file sp-namedview.cpp.

References views.

◆ set()

void SPNamedView::set ( SPAttr  key,
char const *  value 
)
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.

◆ set_clip_to_page()

void SPNamedView::set_clip_to_page ( SPDesktop desktop,
bool  enable 
)

◆ set_desk_color()

◆ set_origin_follows_page()

void SPNamedView::set_origin_follows_page ( bool  on)

◆ set_y_axis_down()

void SPNamedView::set_y_axis_down ( bool  down)

◆ setDefaultAttribute()

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.

Parameters
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().

◆ setDisplayUnit() [1/2]

void SPNamedView::setDisplayUnit ( Inkscape::Util::Unit const *  unit)

◆ setDisplayUnit() [2/2]

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().

◆ setLockGuides()

◆ setShowGrids()

◆ setShowGuides()

◆ setShowGuideSingle()

void SPNamedView::setShowGuideSingle ( SPGuide guide)
private

Definition at line 824 of file sp-namedview.cpp.

References getShowGuides(), SPGuide::hideSPGuide(), and SPGuide::showSPGuide().

Referenced by child_added(), show(), and updateGuides().

◆ show()

◆ tag()

int SPNamedView::tag ( ) const
inlineoverridevirtual

Reimplemented from SPObject.

Definition at line 53 of file sp-namedview.h.

References tag_of.

◆ temporarily_show_guides()

void SPNamedView::temporarily_show_guides ( bool  show)

◆ toggleLockGuides()

void SPNamedView::toggleLockGuides ( )

Definition at line 774 of file sp-namedview.cpp.

References getLockGuides(), and setLockGuides().

Referenced by lock_all_guides(), and SPDesktop::toggleLockGuides().

◆ toggleShowGrids()

void SPNamedView::toggleShowGrids ( )

Definition at line 779 of file sp-namedview.cpp.

References getShowGrids(), and setShowGrids().

Referenced by show_grids().

◆ toggleShowGuides()

void SPNamedView::toggleShowGuides ( )

◆ translateGrids()

void SPNamedView::translateGrids ( Geom::Translate const &  translation)

Definition at line 944 of file sp-namedview.cpp.

References SPObject::document, SPDocument::getDocumentScale(), grids, and scale.

◆ translateGuides()

void SPNamedView::translateGuides ( Geom::Translate const &  translation)

Definition at line 935 of file sp-namedview.cpp.

References SPGuide::getPoint(), guides, and SPGuide::moveto().

◆ update()

void SPNamedView::update ( SPCtx ctx,
unsigned int  flags 
)
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().

◆ updateGrids()

void SPNamedView::updateGrids ( )
private

Definition at line 859 of file sp-namedview.cpp.

References _sync_grids, SPObject::document, SPDocument::getActionGroup(), getShowGrids(), and grids.

Referenced by set().

◆ updateGuides()

void SPNamedView::updateGuides ( )
private

◆ updateViewPort()

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().

◆ write()

Inkscape::XML::Node * SPNamedView::write ( Inkscape::XML::Document xml_doc,
Inkscape::XML::Node repr,
unsigned int  flags 
)
overrideprotectedvirtual

Friends And Related Symbol Documentation

◆ SPDocument

friend class SPDocument
friend

Definition at line 141 of file sp-namedview.h.

Member Data Documentation

◆ _desk_color

std::optional<Colors::Color> SPNamedView::_desk_color
private

Definition at line 145 of file sp-namedview.h.

Referenced by getDeskColor(), and set().

◆ _guide_color

std::optional<Colors::Color> SPNamedView::_guide_color
private

Definition at line 146 of file sp-namedview.h.

Referenced by getGuideColor(), and set().

◆ _guide_hi_color

std::optional<Colors::Color> SPNamedView::_guide_hi_color
private

Definition at line 147 of file sp-namedview.h.

Referenced by getGuideHiColor(), and set().

◆ _guide_hi_opacity

double SPNamedView::_guide_hi_opacity = 0.5
private

Definition at line 149 of file sp-namedview.h.

Referenced by getGuideHiColor(), and set().

◆ _guide_opacity

double SPNamedView::_guide_opacity = 0.6
private

Definition at line 148 of file sp-namedview.h.

Referenced by getGuideColor(), and set().

◆ _origin_correction

SVGBool SPNamedView::_origin_correction {true}
private

Definition at line 151 of file sp-namedview.h.

Referenced by get_origin_follows_page(), and set().

◆ _sync_grids

bool SPNamedView::_sync_grids = true
private

Definition at line 144 of file sp-namedview.h.

Referenced by newGridCreated(), and updateGrids().

◆ _viewport

std::unique_ptr<Inkscape::CanvasPage> SPNamedView::_viewport
private

Definition at line 143 of file sp-namedview.h.

Referenced by hide(), modified(), set_desk_color(), show(), SPNamedView(), and updateViewPort().

◆ _y_axis_down

SVGBool SPNamedView::_y_axis_down {true}
private

Definition at line 152 of file sp-namedview.h.

Referenced by is_y_axis_down(), and set().

◆ antialias_rendering

SVGBool SPNamedView::antialias_rendering {true}

Definition at line 60 of file sp-namedview.h.

Referenced by modified(), and set().

◆ clip_to_page

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().

◆ connector_spacing

double SPNamedView::connector_spacing

◆ cx

double SPNamedView::cx = 0

Definition at line 64 of file sp-namedview.h.

Referenced by set(), and sp_namedview_zoom_and_view_from_document().

◆ cy

double SPNamedView::cy = 0

Definition at line 65 of file sp-namedview.h.

Referenced by set(), and sp_namedview_zoom_and_view_from_document().

◆ default_layer_id

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().

◆ desk_checkerboard

SVGBool SPNamedView::desk_checkerboard {false}

Definition at line 61 of file sp-namedview.h.

Referenced by set(), and set_desk_color().

◆ display_units

◆ editable

bool SPNamedView::editable = true

Definition at line 55 of file sp-namedview.h.

Referenced by child_added(), and set().

◆ grids

◆ grids_visible

SVGBool SPNamedView::grids_visible {false}

Definition at line 58 of file sp-namedview.h.

Referenced by getShowGrids(), newGridCreated(), and set().

◆ guides

◆ lockguides

SVGBool SPNamedView::lockguides {false}

Definition at line 57 of file sp-namedview.h.

Referenced by SPGuide::createSPGuide(), and set().

◆ rotation

double SPNamedView::rotation = 0

Definition at line 63 of file sp-namedview.h.

Referenced by set(), and sp_namedview_zoom_and_view_from_document().

◆ showguides

SVGBool SPNamedView::showguides {true}

Definition at line 56 of file sp-namedview.h.

Referenced by set().

◆ snap_manager

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().

◆ viewcount

int SPNamedView::viewcount = 0

Definition at line 79 of file sp-namedview.h.

Referenced by SPDesktop::_attachDocument().

◆ views

std::vector<SPDesktop *> SPNamedView::views

◆ window_height

int SPNamedView::window_height = 0

Definition at line 67 of file sp-namedview.h.

Referenced by set(), and sp_namedview_window_from_document().

◆ window_maximized

int SPNamedView::window_maximized = 0

Definition at line 70 of file sp-namedview.h.

Referenced by set(), and sp_namedview_window_from_document().

◆ window_width

int SPNamedView::window_width = 0

Definition at line 66 of file sp-namedview.h.

Referenced by set(), and sp_namedview_window_from_document().

◆ window_x

int SPNamedView::window_x = 0

Definition at line 68 of file sp-namedview.h.

Referenced by set(), and sp_namedview_window_from_document().

◆ window_y

int SPNamedView::window_y = 0

Definition at line 69 of file sp-namedview.h.

Referenced by set(), and sp_namedview_window_from_document().

◆ zoom

double SPNamedView::zoom = 0

Definition at line 62 of file sp-namedview.h.

Referenced by set(), and sp_namedview_zoom_and_view_from_document().


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