2#ifndef INKSCAPE_SP_NAMEDVIEW_H
3#define INKSCAPE_SP_NAMEDVIEW_H
53 int tag()
const override {
return tag_of<
decltype(*this)>; }
83 void setDefaultAttribute(std::string attribute, std::string preference, std::string fallback);
157 void modified(
unsigned int flags)
override;
158 void update(
SPCtx *ctx,
unsigned int flags)
override;
Lookup dictionary for attributes/properties.
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Interface for refcounted XML nodes.
To do: update description of desktop.
Typed SVG document implementation.
char const * getName() const
void modified(unsigned int flags) override
void set_y_axis_down(bool down)
SVGBool desk_checkerboard
void scrollAllDesktops(double dx, double dy)
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.
std::optional< Colors::Color > _guide_color
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
void setShowGuideSingle(SPGuide *guide)
std::optional< Colors::Color > _desk_color
void show(SPDesktop *desktop)
void temporarily_show_guides(bool show)
std::vector< SPDesktop * > const getViewList() const
std::unique_ptr< Inkscape::CanvasPage > _viewport
std::optional< Colors::Color > _guide_hi_color
void translateGrids(Geom::Translate const &translation)
void order_changed(Inkscape::XML::Node *child, Inkscape::XML::Node *old_repr, Inkscape::XML::Node *new_repr) override
void remove_child(Inkscape::XML::Node *child) override
void set_clip_to_page(SPDesktop *desktop, bool enable)
SVGBool _origin_correction
std::vector< SPGuide * > guides
SPGrid * getFirstEnabledGrid()
Returns the first grid it could find that isEnabled().
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
void setLockGuides(bool v)
Colors::Color getGuideHiColor() const
void activateGuides(void *desktop, bool active)
bool get_origin_follows_page() const
Inkscape::Util::Unit const * display_units
void setShowGrids(bool v)
Colors::Color getGuideColor() const
std::vector< SPDesktop * > views
Colors::Color getDeskColor() const
void set_origin_follows_page(bool on)
SVGBool antialias_rendering
void change_bool_setting(SPAttr key, bool value)
Inkscape::Util::Unit const * getDisplayUnit() const
Returns namedview's default unit.
void build(SPDocument *document, Inkscape::XML::Node *repr) override
bool is_y_axis_down() const
void set_desk_color(SPDesktop *desktop)
void change_color(SPAttr color_key, SPAttr opacity_key, Colors::Color const &color)
void setDisplayUnit(std::string unit)
Set the display unit to the given value.
void setShowGuides(bool v)
std::vector< SPGrid * > grids
void hide(SPDesktop const *desktop)
void updateViewPort()
Update the visibility of the viewport space.
void update(SPCtx *ctx, unsigned int flags) override
Propergate the update to the child nodes so they can be updated correctly.
void translateGuides(Geom::Translate const &translation)
Inkscape::XML::Node * repr
Class to coordinate snapping operations.
Miscellaneous supporting code.
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
void sp_namedview_zoom_and_view_from_document(SPDesktop *desktop)
void sp_namedview_document_from_window(SPDesktop *desktop)
void sp_namedview_window_from_document(SPDesktop *desktop)
void sp_namedview_update_layers_from_document(SPDesktop *desktop)
const Inkscape::Util::Unit * sp_parse_document_units(const char *unit)
Interface for XML documents.