/*
6 * Lauris Kaplinski 2000
9 * Jon A. Cruz <jon@joncruz.org>
11 * Copyright (C) 2018 Authors
12 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
14#ifndef SEEN_SP_GUIDE_H
15#define SEEN_SP_GUIDE_H
31 class CanvasItemGroup;
32 class CanvasItemGuideLine;
46 int tag()
const override {
return tag_of<
decltype(*this)>; }
48 void set_color(
const unsigned r,
const unsigned g,
const unsigned b,
bool const commit);
75 bool remove(
bool force=
false);
92 std::vector<CanvasItemPtr<Inkscape::CanvasItemGuideLine>>
views;
Cartesian point / 2D vector and related operations.
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Two-dimensional point that doubles as a vector.
Interface for refcounted XML nodes.
To do: update description of desktop.
Typed SVG document implementation.
void set_locked(const bool locked, bool const commit)
guint32 getHiColor() const
void setHiColor(guint32 h)
char * description(bool const verbose=true) const
Returns a human-readable description of the guideline for use in dialog boxes and status bar.
Geom::Point getNormal() const
void sensitize(Inkscape::UI::Widget::Canvas *canvas, bool sensitive)
bool isHorizontal() const
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
void set_color(const unsigned r, const unsigned g, const unsigned b, bool const commit)
void moveto(Geom::Point const point_on_line, bool const commit)
Geom::Point point_on_line
~SPGuide() override=default
Geom::Point normal_to_line
std::vector< CanvasItemPtr< Inkscape::CanvasItemGuideLine > > views
void set_normal(Geom::Point const normal_to_line, bool const commit)
static SPGuide * createSPGuide(SPDocument *doc, Geom::Point const &pt1, Geom::Point const &pt2)
Geom::Point getPoint() const
bool remove(bool force=false)
void set_label(const char *label, bool const commit)
char const * getLabel() const
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
void sp_guide_create_guides_around_page(SPDocument *doc)
void sp_guide_pt_pairs_to_guides(SPDocument *doc, std::list< std::pair< Geom::Point, Geom::Point > > &pts)
void sp_guide_delete_all_guides(SPDocument *doc)