18#ifndef SEEN_SP_GRID_H_
19#define SEEN_SP_GRID_H_
52 int tag()
const override {
return tag_of<
decltype(*this)>; }
104 void setUnit(
const Glib::ustring &units);
117 std::vector<CanvasItemPtr<Inkscape::CanvasItemGrid>>
views;
124 void modified(
unsigned int flags)
override;
125 void update(
SPCtx *ctx,
unsigned int flags)
override;
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Two-dimensional point that doubles as a vector.
Parent for classes that can snap points to something.
Interface for refcounted XML nodes.
To do: update description of desktop.
Typed SVG document implementation.
sigc::connection _page_modified_connection
Inkscape::CanvasItemGrid * getAssociatedView(SPDesktop const *desktop)
SVGBool _snap_to_visible_only
void setType(GridType type)
static void create_new(SPDocument *doc, Inkscape::XML::Node *parent, GridType type)
Geom::Point get_margin() const
void modified(unsigned int flags) override
Geom::Point getSpacing() const
void show(SPDesktop *desktop)
creates a new grid canvasitem for the SPDesktop given as parameter.
const char * getSVGType() const
Inkscape::Colors::Color _minor_color
void hide(SPDesktop const *desktop)
Inkscape::Colors::Color const & getMinorColor() const
Inkscape::Snapper * snapper()
guint32 getMajorLineInterval() const
void setOrigin(Geom::Point const &new_origin)
void _checkOldGrid(SPDocument *doc, Inkscape::XML::Node *repr)
checks for old grid attriubte keys from version 0.46 to determine if there needs to be legacy attribu...
void setAngleX(double deg)
const char * typeName() const
void update(SPCtx *ctx, unsigned int flags) override
Inkscape::Colors::Color const & getMajorColor() const
void setMajorColor(Inkscape::Colors::Color const &color)
void setSVGType(const char *svgtype)
Inkscape::Util::Unit const * _display_unit
Geom::Point get_gap() const
std::pair< Geom::Point, Geom::Point > getEffectiveOriginAndSpacing(int index=-1) const
void setAngleZ(double deg)
const Inkscape::Util::Unit * getUnit() const
Inkscape::Colors::Color _major_color
const char * displayName() const
void setSnapToVisibleOnly(bool v)
std::unique_ptr< Inkscape::Snapper > _snapper
void setSpacing(Geom::Point const &spacing)
sigc::connection _page_selected_connection
void setUnit(const Glib::ustring &units)
Geom::Point getOrigin() const
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
void setMinorColor(Inkscape::Colors::Color const &color)
void setMajorLineInterval(guint32 interval)
std::vector< CanvasItemPtr< Inkscape::CanvasItemGrid > > views
guint32 _major_line_interval
bool getSnapToVisibleOnly() const
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
Miscellaneous supporting code.
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key