diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /src/object/sp-conn-end.h | |
parent | Initial commit. (diff) | |
download | inkscape-upstream/1.2.2.tar.xz inkscape-upstream/1.2.2.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/object/sp-conn-end.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/object/sp-conn-end.h b/src/object/sp-conn-end.h new file mode 100644 index 0000000..1779a5b --- /dev/null +++ b/src/object/sp-conn-end.h @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * TODO: insert short description here + *//* + * Authors: see git history + * + * Copyright (C) 2018 Authors + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ +#ifndef SEEN_SP_CONN_END +#define SEEN_SP_CONN_END + +#include <cstddef> +#include <sigc++/connection.h> + +#include "sp-use-reference.h" +#include "conn-avoid-ref.h" + +class SPPath; + +class SPConnEnd { +public: + SPConnEnd(SPObject *owner); + + /* + * Ref points to the main object the connection end is attached to + * while sub_ref points to a sub-object that may be inside a symbol + * or clone object id. Sub_ref is optional. + */ + SPUseReference ref; + SPUseReference sub_ref; + char *href = nullptr; + char *sub_href = nullptr; + + /** Change of href string (not a modification of the attributes of the referrent). */ + sigc::connection _changed_connection; + + /** Called when the attached object gets deleted. */ + sigc::connection _delete_connection; + + /** A sigc connection for transformed signal, used to do move compensation. */ + sigc::connection _transformed_connection; + + /** A sigc connection for owning group transformed, used to do move compensation. */ + sigc::connection _group_connection; + + void setAttacherHref(char const * value); + void setAttacherSubHref(char const * value); + + +private: + SPConnEnd(SPConnEnd const &) = delete; // no copy + SPConnEnd &operator=(SPConnEnd const &) = delete; // no assign +}; + +void sp_conn_end_href_changed(SPObject *old_ref, SPObject *ref, + SPConnEnd *connEnd, SPPath *path, unsigned const handle_ix); +void sp_conn_reroute_path(SPPath *const path); +void sp_conn_reroute_path_immediate(SPPath *const path); +void sp_conn_redraw_path(SPPath *const path); +void sp_conn_end_detach(SPObject *const owner, unsigned const handle_ix); + + +#endif /* !SEEN_SP_CONN_END */ + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |